Skip to content
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

fixes IN and #587 #801

Merged
merged 5 commits into from
Jan 15, 2023
Merged

fixes IN and #587 #801

merged 5 commits into from
Jan 15, 2023

Conversation

sviezypan
Copy link
Collaborator

@sviezypan sviezypan commented Dec 31, 2022

This PR fixes sql 's IN which was not well defined.
You can call IN with any sequence of values like

select(fkProductId).from(productPrices).where(price in List(10, 20, 74))

or you use IN with subquery

val subquery = select(age).from(users).where(age > 18)
select(fName).from(users).where(age in subquery)

Also fixes #587 so the following query

select(fName, lName, orderDate).from(customers.join(orders).on(fkCustomerId == customerId))

will yield error message (there should be 3 equal signs ===)

Use === instead of == when comparing two Exprs

@sviezypan sviezypan requested a review from a team as a code owner December 31, 2022 13:40
@jczuchnowski jczuchnowski merged commit a47150b into zio:master Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

== vs === in JOIN ON
2 participants