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
{{ message }}
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.
SELECT "bids".* FROM "bids" WHERE (miscellaneous @> ('model_number=>ABC-123'))
the query works. But when I try to interpolate with a ? it adds an extra set of single quotes which raises an error:
Bid.where("miscellaneous @> ('model_number=>?)", 'ABC-123')
SELECT "bids".* FROM "bids" WHERE (miscellaneous @> ('model_number=>'ABC-123''))
PG::SyntaxError: ERROR: syntax error at or near "ABC"
What am I missing?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I embed a value directly into a query as so:
Bid.where("miscellaneous @> ('model_number=>ABC-123')")
SELECT "bids".* FROM "bids" WHERE (miscellaneous @> ('model_number=>ABC-123'))
the query works. But when I try to interpolate with a ? it adds an extra set of single quotes which raises an error:
Bid.where("miscellaneous @> ('model_number=>?)", 'ABC-123')
SELECT "bids".* FROM "bids" WHERE (miscellaneous @> ('model_number=>'ABC-123''))
PG::SyntaxError: ERROR: syntax error at or near "ABC"
What am I missing?
The text was updated successfully, but these errors were encountered: