mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: update search memo filter
This commit is contained in:
@ -84,6 +84,15 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
|
||||
if v.Tag != nil {
|
||||
where, args = append(where, "memo.payload->'property'->'tags' @> "+placeholder(len(args)+1)), append(args, fmt.Sprintf(`["%s"]`, *v.Tag))
|
||||
}
|
||||
if v.HasLink {
|
||||
where = append(where, "(memo.payload->'property'->>'hasLink')::BOOLEAN IS TRUE")
|
||||
}
|
||||
if v.HasTaskList {
|
||||
where = append(where, "(memo.payload->'property'->>'hasTaskList')::BOOLEAN IS TRUE")
|
||||
}
|
||||
if v.HasCode {
|
||||
where = append(where, "(memo.payload->'property'->>'hasCode')::BOOLEAN IS TRUE")
|
||||
}
|
||||
}
|
||||
if find.ExcludeComments {
|
||||
where = append(where, "memo_relation.related_memo_id IS NULL")
|
||||
|
Reference in New Issue
Block a user