Skip to content

Commit

Permalink
fix: tag query for mysql (#3785)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiltshiftfocus authored Aug 6, 2024
1 parent 1587457 commit a5978e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion store/db/mysql/memo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a5978e7

Please sign in to comment.