Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Add Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9958

Daniel31442f45d605
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index e83dc6c5f3..696660d83f 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -1995,6 +1995,10 @@ func addAttributeViewColumn(operation *Operation) (err error) {
icon = operation.Data.(string)
}
key := av.NewKey(operation.ID, operation.Name, icon, keyType)
+ if av.KeyTypeRollup == keyType {
+ key.Rollup = &av.Rollup{Calc: &av.RollupCalc{Operator: av.CalcOperatorNone}}
+ }
+
attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
for _, view := range attrView.Views {