Replies: 1 comment 1 reply
-
You can pass the array as the parameter: relation.where(Sequel.lit('id IN ?', ['1', '2'])) AFAIK, ruby arrays will be converted into |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I'm curious about how to handle the following correctly, without introducing vulnerabilities:
the above code produces:
I know, this should be solved with Sequel DSL, but I want to know how I can achieve it with
Sequel.lit
Do you have to use a prepared statement?
I found this answer at SO: https://stackoverflow.com/questions/29856697/how-do-i-pass-a-variable-into-a-prepared-statement-in-ruby
Is this the answer and the right way to achieve this?
Thanks and best regards
Beta Was this translation helpful? Give feedback.
All reactions