From aa664856cca81ad776f6a79eaa8a6eca33d7f382 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Thu, 2 Mar 2023 09:16:30 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=9F=BA=E4=BA=8E=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=9D=97=E5=B1=9E=E6=80=A7=E5=8A=A8=E6=80=81=E5=BB=BA=E7=AB=8B?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E6=95=B0=E6=8D=AE=E5=BA=93=E8=A1=A8=E7=BB=93?= =?UTF-8?q?=E6=9E=84=20https://github.com/siyuan-note/siyuan/issues/7521?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/av/attribute_view.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/av/attribute_view.go b/kernel/av/attribute_view.go index 4244d9047..7b85ffcca 100644 --- a/kernel/av/attribute_view.go +++ b/kernel/av/attribute_view.go @@ -34,12 +34,19 @@ type AttributeView struct { Columns []Column `json:"columns"` // 表格列名 Rows [][]string `json:"rows"` // 表格行记录 + Type AttributeViewType `json:"type"` // 属性视图类型 Projections []string `json:"projections"` // 显示的列名,SELECT * Filters []*AttributeViewFilter `json:"filters"` // 过滤规则,WHERE ... Sorts []*AttributeViewSort `json:"sorts"` // 排序规则,ORDER BY ... - } +// AttributeViewType 描述了属性视图的类型。 +type AttributeViewType string + +const ( + AttributeViewTypeTable AttributeViewType = "table" // 属性视图类型 - 表格 +) + func (av *AttributeView) GetColumnNames() (ret []string) { ret = []string{} for _, column := range av.Columns {