mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
📝 Database rollup field filtering rules support "Any", "All", and "None" https://github.com/siyuan-note/siyuan/issues/15609
This commit is contained in:
parent
305bd9dfb0
commit
8ebb617072
1 changed files with 2 additions and 13 deletions
|
|
@ -193,19 +193,8 @@ func (value *Value) Filter(filter *ViewFilter, attrView *AttributeView, itemID s
|
||||||
switch filter.Qualifier {
|
switch filter.Qualifier {
|
||||||
case FilterQuantifierUndefined, FilterQuantifierAny:
|
case FilterQuantifierUndefined, FilterQuantifierAny:
|
||||||
for _, content := range value.Rollup.Contents {
|
for _, content := range value.Rollup.Contents {
|
||||||
switch filter.Operator {
|
if content.filter(filter.Value.Rollup.Contents[0], filter.RelativeDate, filter.RelativeDate2, filter.Operator) {
|
||||||
case FilterOperatorContains:
|
return true
|
||||||
if content.filter(filter.Value.Rollup.Contents[0], filter.RelativeDate, filter.RelativeDate2, filter.Operator) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
case FilterOperatorDoesNotContain:
|
|
||||||
if !content.filter(filter.Value.Rollup.Contents[0], filter.RelativeDate, filter.RelativeDate2, filter.Operator) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
if content.filter(filter.Value.Rollup.Contents[0], filter.RelativeDate, filter.RelativeDate2, filter.Operator) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
case FilterQuantifierAll:
|
case FilterQuantifierAll:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue