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

This commit is contained in:
Daniel 2024-01-01 21:17:36 +08:00
parent 7c799a92bf
commit 31442f45d6
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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 {