Просмотр исходного кода

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

Daniel 1 год назад
Родитель
Сommit
31442f45d6
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      kernel/model/attribute_view.go

+ 4 - 0
kernel/model/attribute_view.go

@@ -1995,6 +1995,10 @@ func addAttributeViewColumn(operation *Operation) (err error) {
 			icon = operation.Data.(string)
 			icon = operation.Data.(string)
 		}
 		}
 		key := av.NewKey(operation.ID, operation.Name, icon, keyType)
 		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})
 		attrView.KeyValues = append(attrView.KeyValues, &av.KeyValues{Key: key})
 
 
 		for _, view := range attrView.Views {
 		for _, view := range attrView.Views {