Unverified Commit 0a9212f8 authored by wzc90's avatar wzc90 Committed by GitHub

fix: memo find for mysql(#3387)

* Update memo.go

* Update store/db/mysql/memo.go
Co-authored-by: 's avatarboojack <stevenlgtm@gmail.com>

---------
Co-authored-by: 's avatarboojack <stevenlgtm@gmail.com>
parent 537ae622
......@@ -91,7 +91,7 @@ func (d *DB) ListMemos(ctx context.Context, find *store.FindMemo) ([]*store.Memo
where, args = append(where, "`memo`.`payload` = ?"), append(args, *v.Raw)
}
if v.Tag != nil {
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(payload, '$.property.tags[*]'), ?, '$')"), append(args, *v.Tag)
where, args = append(where, "JSON_CONTAINS(JSON_EXTRACT(`memo`.`payload`, '$.property.tags'), ?)"), append(args, fmt.Sprintf(`["%s"]`, *v.Tag))
}
}
if find.ExcludeComments {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment