mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-22 15:04:07 +01:00
✨ Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
This commit is contained in:
parent
0ca321f8d4
commit
e98dcf65b6
6 changed files with 30 additions and 20 deletions
|
|
@ -254,7 +254,6 @@ func NewGalleryView() (ret *View) {
|
|||
type Viewable interface {
|
||||
Filterable
|
||||
Sortable
|
||||
Groupable
|
||||
Calculable
|
||||
|
||||
GetType() LayoutType
|
||||
|
|
|
|||
|
|
@ -16,13 +16,6 @@
|
|||
|
||||
package av
|
||||
|
||||
// Groupable 定义了可分组的视图类型。
|
||||
type Groupable interface {
|
||||
|
||||
// Group 根据视图中设置的分组规则进行分组。
|
||||
Group(attrView *AttributeView)
|
||||
}
|
||||
|
||||
type ViewGroup struct {
|
||||
Field string `json:"field"` // 分组字段 ID
|
||||
Method GroupMethod `json:"method"` // 分组方式
|
||||
|
|
|
|||
|
|
@ -316,7 +316,3 @@ func filter0(collection Collection, attrView *AttributeView) {
|
|||
}
|
||||
collection.SetItems(items)
|
||||
}
|
||||
|
||||
func group0(collection Collection, attrView *AttributeView) {
|
||||
// TODO 分组 Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,3 @@ func (gallery *Gallery) Sort(attrView *AttributeView) {
|
|||
func (gallery *Gallery) Filter(attrView *AttributeView) {
|
||||
filter0(gallery, attrView)
|
||||
}
|
||||
|
||||
func (gallery *Gallery) Group(attrView *AttributeView) {
|
||||
group0(gallery, attrView)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,3 @@ func (table *Table) Sort(attrView *AttributeView) {
|
|||
func (table *Table) Filter(attrView *AttributeView) {
|
||||
filter0(table, attrView)
|
||||
}
|
||||
|
||||
func (table *Table) Group(attrView *AttributeView) {
|
||||
group0(table, attrView)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue