You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"level":"error","module":"pgx","err":"ERROR: syntax error at or near \")\" (SQLSTATE 42601)","name":"stmtcache_16","pid":56,"sql":"SELECT \"role\" FROM \"account_users\" WHERE ((\"account_id\" = ?) AND (\"user_id\" = ?)) LIMIT ?","time":0.522084,"time":"2023-07-19T12:00:44-07:00","message":"Prepare"}
{"level":"error","module":"pgx","args":[{"1082":1,"1114":1,"1184":1,"16":1,"17":1,"20":1,"21":1,"23":1,"26":1,"28":1,"29":1,"700":1,"701":1},"a59a0a44-49d3-4f77-ad48-45d48afa4138","77fdd86f-ff4f-4ca7-a40e-9a51ad490167",1],"err":"ERROR: syntax error at or near \")\" (SQLSTATE 42601)","pid":56,"sql":"SELECT \"role\" FROM \"account_users\" WHERE ((\"account_id\" = ?) AND (\"user_id\" = ?)) LIMIT ?","time":0.531333,"time":"2023-07-19T12:00:44-07:00","message":"Query"}
To Reproduce
var role string
found, err := db.From(TableAccountUsers)..Prepared(true).Select("role").Where(goqu.Ex{
"user_id": userId,
"account_id": accountId,
}).ScanValContext(ctx, &role)
Expected behavior
Should work without errors
Dialect:
[x ] postgres
mysql
sqlite3
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I am able to solve this problem. I haven't import _ "github.com/doug-martin/goqu/v9/dialect/postgres" this. which internally registers Postgres Dialect
Describe the bug
This code works perfectly fine:
However, if i add
.Prepared(true)
to it, it results in an error:error:
To Reproduce
Expected behavior
Should work without errors
Dialect:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: