mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
e17e9aa1cf
commit
2e444d899b
3 changed files with 4 additions and 3 deletions
|
|
@ -221,7 +221,7 @@ func upgradeSpec1(av *AttributeView) {
|
|||
}
|
||||
}
|
||||
|
||||
// 补全过滤器 Value
|
||||
// 补全过滤规则 Value
|
||||
for _, view := range av.Views {
|
||||
if nil != view.Table {
|
||||
for _, f := range view.Table.Filters {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
// ViewFilter 描述了视图过滤器的结构。
|
||||
// ViewFilter 描述了视图过滤规则的结构。
|
||||
type ViewFilter struct {
|
||||
Column string `json:"column"` // 列(字段)ID
|
||||
Operator FilterOperator `json:"operator"` // 过滤操作符
|
||||
|
|
@ -134,7 +134,7 @@ func (value *Value) Filter(filter *ViewFilter, attrView *AttributeView, rowID st
|
|||
}
|
||||
|
||||
if nil != filter.Value && value.Type != filter.Value.Type {
|
||||
// 由于字段类型被用户编辑过导致和过滤器值类型不匹配,该情况下不过滤
|
||||
// 由于字段类型被用户编辑过导致和过滤规则值类型不匹配,该情况下不过滤
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package av
|
||||
|
||||
// ViewGroup 描述了视图分组规则的结构。
|
||||
type ViewGroup struct {
|
||||
Field string `json:"field"` // 分组字段 ID
|
||||
Method GroupMethod `json:"method"` // 分组方式
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue