mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-01 06:18:49 +01:00
🐛 The corresponding entry cannot be found in the database relation https://github.com/siyuan-note/siyuan/issues/10523
This commit is contained in:
parent
23c4f81289
commit
8e4dbcfa31
2 changed files with 10 additions and 4 deletions
|
|
@ -55,7 +55,7 @@ func SetDatabaseBlockView(blockID, viewID string) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetAttributeViewPrimaryKeyValues(avID string, page, pageSize int) (attributeViewName string, keyValues *av.KeyValues, err error) {
|
||||
func GetAttributeViewPrimaryKeyValues(avID, keyword string, page, pageSize int) (attributeViewName string, keyValues *av.KeyValues, err error) {
|
||||
waitForSyncingStorages()
|
||||
|
||||
attrView, err := av.ParseAttributeView(avID)
|
||||
|
|
@ -86,11 +86,13 @@ func GetAttributeViewPrimaryKeyValues(avID string, page, pageSize int) (attribut
|
|||
}
|
||||
keyValues.Values = []*av.Value{}
|
||||
for _, v := range tmp {
|
||||
keyValues.Values = append(keyValues.Values, v)
|
||||
if strings.Contains(strings.ToLower(v.String()), strings.ToLower(keyword)) {
|
||||
keyValues.Values = append(keyValues.Values, v)
|
||||
}
|
||||
}
|
||||
|
||||
if 1 > pageSize {
|
||||
pageSize = 50
|
||||
pageSize = 32
|
||||
}
|
||||
start := (page - 1) * pageSize
|
||||
end := start + pageSize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue