mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
⚡ Improve database view performance https://github.com/siyuan-note/siyuan/issues/17830
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
@@ -40,13 +40,13 @@ func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query
|
||||
// 组装字段
|
||||
for _, field := range view.Gallery.CardFields {
|
||||
key, getErr := attrView.GetKey(field.ID)
|
||||
if nil != getErr {
|
||||
// 找不到字段则在视图中删除(元数据查询场景不写盘)
|
||||
if !ignoreRows {
|
||||
removeMissingField(attrView, view, field.ID)
|
||||
}
|
||||
continue
|
||||
if nil != getErr {
|
||||
// 找不到字段则在视图中删除(元数据查询场景不写盘)
|
||||
if !ignoreRows {
|
||||
removeMissingField(attrView, view, field.ID)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
ret.Fields = append(ret.Fields, &av.GalleryField{
|
||||
BaseInstanceField: &av.BaseInstanceField{
|
||||
|
||||
@@ -35,13 +35,13 @@ func RenderAttributeViewKanban(attrView *av.AttributeView, view *av.View, query
|
||||
// 组装字段
|
||||
for _, field := range view.Kanban.Fields {
|
||||
key, getErr := attrView.GetKey(field.ID)
|
||||
if nil != getErr {
|
||||
// 找不到字段则在视图中删除(元数据查询场景不写盘)
|
||||
if !ignoreRows {
|
||||
removeMissingField(attrView, view, field.ID)
|
||||
}
|
||||
continue
|
||||
if nil != getErr {
|
||||
// 找不到字段则在视图中删除(元数据查询场景不写盘)
|
||||
if !ignoreRows {
|
||||
removeMissingField(attrView, view, field.ID)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
ret.Fields = append(ret.Fields, &av.KanbanField{
|
||||
BaseInstanceField: &av.BaseInstanceField{
|
||||
|
||||
@@ -36,15 +36,15 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
|
||||
}
|
||||
|
||||
// 组装列
|
||||
for _, col := range view.Table.Columns {
|
||||
key, getErr := attrView.GetKey(col.ID)
|
||||
if nil != getErr {
|
||||
// 找不到字段则在视图中删除(元数据查询场景不写盘)
|
||||
if !ignoreRows {
|
||||
removeMissingField(attrView, view, col.ID)
|
||||
}
|
||||
continue
|
||||
for _, col := range view.Table.Columns {
|
||||
key, getErr := attrView.GetKey(col.ID)
|
||||
if nil != getErr {
|
||||
// 找不到字段则在视图中删除(元数据查询场景不写盘)
|
||||
if !ignoreRows {
|
||||
removeMissingField(attrView, view, col.ID)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
ret.Columns = append(ret.Columns, &av.TableColumn{
|
||||
BaseInstanceField: &av.BaseInstanceField{
|
||||
|
||||
Reference in New Issue
Block a user