fix: tag query for mysql (#3785)
This commit is contained in:
parent
158745704e
commit
a5978e7657
1 changed files with 1 additions and 1 deletions
|
|
@ -92,7 +92,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
|
||||||
}
|
}
|
||||||
if len(v.TagSearch) != 0 {
|
if len(v.TagSearch) != 0 {
|
||||||
for _, tag := range v.TagSearch {
|
for _, tag := range v.TagSearch {
|
||||||
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(`memo`.`payload`, '$.property.tags'), ?)"), append(args, fmt.Sprintf(`%%"%s"%%`, tag))
|
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(`memo`.`payload`, '$.property.tags'), ?)"), append(args, fmt.Sprintf(`"%s"`, tag))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if v.HasLink {
|
if v.HasLink {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue