fix: tag query for mysql (#3785)

pull/3794/head
tiltshiftfocus 7 months ago committed by GitHub
parent 158745704e
commit a5978e7657
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -92,7 +92,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_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 {

Loading…
Cancel
Save