An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: 基于内容块属性动态建立对应数据库表结构 https://github.com/siyuan-note/siyuan/issues/7521
Liang Ding7dcef7b84b88
diff --git a/kernel/av/attribute_view.go b/kernel/av/av.gosimilarity index 98%rename from kernel/av/attribute_view.gorename to kernel/av/av.goindex 7b85ffcca0..5ef3560d87 100644--- a/kernel/av/attribute_view.go+++ b/kernel/av/av.go@@ -14,7 +14,7 @@// You should have received a copy of the GNU Affero General Public License// along with this program. If not, see <https://www.gnu.org/licenses/>.-// Package av 是属性视图相关的实现。+// Package av 包含了属性视图(Attribute View)相关的实现。package avimport (diff --git a/kernel/av/column.go b/kernel/av/column.goindex 3eb5b47a16..08b9fd37be 100644--- a/kernel/av/column.go+++ b/kernel/av/column.go@@ -47,3 +47,10 @@ func (c *BaseColumn) Name() string {func (c *BaseColumn) Type() string {return c.BaseType}++// ColumnValueResolver 描述了属性视图的列值解析器。+type ColumnValueResolver interface {++ // Resolve 用于解析列值。+ Resolve() string+}diff --git a/kernel/av/column_relation.go b/kernel/av/column_relation.goindex d7696c42d4..73c0760856 100644--- a/kernel/av/column_relation.go+++ b/kernel/av/column_relation.go@@ -20,8 +20,3 @@ type ColumnRelation struct {*BaseColumnAttributeViewID string `json:"attributeViewId"` // 关联的属性视图 ID}--type AttributeViewColumnRollup struct {- *BaseColumn- RelationID string `json:"relationId"` // 目标关联列 ID-}diff --git a/kernel/av/column_rollup.go b/kernel/av/column_rollup.gonew file mode 100644index 0000000000..a2eac26b29--- /dev/null+++ b/kernel/av/column_rollup.go@@ -0,0 +1,22 @@+// SiYuan - Build Your Eternal Digital Garden+// Copyright (c) 2020-present, b3log.org+//+// This program is free software: you can redistribute it and/or modify+// it under the terms of the GNU Affero General Public License as published by+// the Free Software Foundation, either version 3 of the License, or+// (at your option) any later version.+//+// This program is distributed in the hope that it will be useful,+// but WITHOUT ANY WARRANTY; without even the implied warranty of+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+// GNU Affero General Public License for more details.+//+// You should have received a copy of the GNU Affero General Public License+// along with this program. If not, see <https://www.gnu.org/licenses/>.++package av++type ColumnRollup struct {+ *BaseColumn+ RelationColumnID string `json:"relationColumnId"` // 目标关联列 ID+}