Support for where(attr: [nil, "foo", "bar"])? #2344
Closed
rolftimmermans
started this conversation in
General
Replies: 2 comments
-
|
The behavior you want is available in the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Wow, thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
When calling
where(attr: [nil, "foo", "bar"])on a dataset, sequel currently transforms this into:WHERE attr IN (NULL, 'foo', 'bar')which does not work as expected.Contrast this to
where(attr: nil)which works fine (WHERE attr IS NULL) andwhere(attr: ["foo", "bar"])which works fine (WHERE attr IN ('foo', 'bar').Ideally
where(attr: [nil, "foo", "bar"])would be turned intoWHERE attr IS NULL OR attr IN ('foo', 'bar').Is there any interest in supporting this use case?
I'd be happy to create a PR in that case.
Beta Was this translation helpful? Give feedback.
All reactions