mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 08:30:42 +02:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
9655780ba4
commit
91a4578859
1 changed files with 3 additions and 7 deletions
|
@ -1359,18 +1359,12 @@ func genGroup(view *av.View, attrView *av.AttributeView) {
|
|||
|
||||
group := view.Group
|
||||
view.Groups = nil
|
||||
|
||||
const (
|
||||
defaultGroupName = "_@default@_"
|
||||
notInRange = "_@notInRange@_"
|
||||
)
|
||||
var groupName string
|
||||
viewable := sql.RenderView(attrView, view, "")
|
||||
|
||||
var items []av.Item
|
||||
for _, item := range viewable.(av.Collection).GetItems() {
|
||||
items = append(items, item)
|
||||
}
|
||||
|
||||
var rangeStart, rangeEnd float64
|
||||
switch group.Method {
|
||||
case av.GroupMethodValue:
|
||||
|
@ -1403,6 +1397,8 @@ func genGroup(view *av.View, attrView *av.AttributeView) {
|
|||
})
|
||||
}
|
||||
|
||||
const defaultGroupName, notInRange = "_@default@_", "_@notInRange@_"
|
||||
var groupName string
|
||||
groupItemsMap := map[string][]av.Item{}
|
||||
for _, item := range items {
|
||||
value := item.GetValue(group.Field)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue