mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
refactor: move tags from property to payload (#4229)
* refactor: move tags from property to payload * chore: fix tests * chore: drop memo tags * chore: update --------- Co-authored-by: Steven <stevenlgtm@gmail.com>
This commit is contained in:
@ -84,7 +84,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
|
||||
}
|
||||
if len(v.TagSearch) != 0 {
|
||||
for _, tag := range v.TagSearch {
|
||||
where, args = append(where, "(JSON_EXTRACT(`memo`.`payload`, '$.property.tags') LIKE ? OR JSON_EXTRACT(`memo`.`payload`, '$.property.tags') LIKE ?)"), append(args, fmt.Sprintf(`%%"%s"%%`, tag), fmt.Sprintf(`%%"%s/%%`, tag))
|
||||
where, args = append(where, "(JSON_EXTRACT(`memo`.`payload`, '$.tags') LIKE ? OR JSON_EXTRACT(`memo`.`payload`, '$.tags') LIKE ?)"), append(args, fmt.Sprintf(`%%"%s"%%`, tag), fmt.Sprintf(`%%"%s/%%`, tag))
|
||||
}
|
||||
}
|
||||
if v.HasLink {
|
||||
|
Reference in New Issue
Block a user