Open omid9h opened 1 month ago
Something that I've found is that sqlc assumes the parameter here at LIKE '%' || sqlc.narg(phone_filter) || '%'
to be interface{} and apparently it conflicts with sql.NullString
which is assumed in above lines.
I was able to solve the error simply by using another param like sqlc.narg(phone_filter2)
but my question is how can define the type explicitly. I've tried ::<type>
but I get syntax error.
I have a MySQL query with multiple named parameters. everything is fine but for bellow chunk:
and for the last line
OR aes_decrypt (from_base64 (u.phone), sqlc.arg(aes_key)) LIKE '%' || sqlc.narg(phone_filter) || '%'
I get this error:
# package demorepo error generating code: named param PhoneFilter has incompatible types: sql.NullString, interface{}
any idea how to fix this? thanks