Escape '?' (placeholder question mark) in where clause #543
-
I want to write a query like this using Bun methods:
So far I came up with this DB.NewSelect().Model(&result).Where("reference_id ? ?", bun.Safe("?"), ref).Order("created_at DESC").Scan(ctx) But I was wondering if there was something to escape the placeholder mark |
Beta Was this translation helpful? Give feedback.
Answered by
vmihailenco
May 25, 2022
Replies: 1 comment
-
Please try to escape it with a backslash like so: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
antipopp
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please try to escape it with a backslash like so:
\?
.