-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WHERE ... IN
with tuples support
#373
Comments
No, such cases are not supported in Exposed and I'm not sure that this is a standard SQL expression.
I didn't test this on real databases and can't guarantee that everything works fine. Also you should understand that this approach doesn't use prepared statement parameters and uses plain sql which can cause to SQL-injection if you'll put string values from client-side. |
I found a reference to the 1992 SQL standard, and if you look at the grammar for
Expanding
Where Similarly, |
I'm not sure that it's possible to define such |
That's fair, I can't really imagine how such an arbitrarily-typed expression could be implemented in a typed manner either. Oh well, carefully-written raw SQL is good enough. Thanks! |
Apologies if this already exists but I could not find it in the library. Does/will Exposed support something like:
SELECT * FROM table WHERE (x,y) IN ((1, 2), (5, 8), (7, 2))
Alternatively, I tried to figure out a way to append an arbitrary amount of
AND
/OR
s to replicate this behavior, but the wayAndOp
andOrOp
are composed doesn't seem to support that.It looks like this is part of the SQL standard but I can't find a source to prove it.
The text was updated successfully, but these errors were encountered: