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

Use proper range increment for values list #641

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

greg-rychlewski
Copy link
Member

Re-reading the SQL generated in the error report for empty values list I noticed it produces 2 empty values:

SELECT TRUE FROM "users" AS u0 INNER JOIN (VALUES (),()) AS v1 () ON u0."id" = v1."id" LIMIT 1

So just adjusting the range increment to be right. We might no have to care about it but just in case we make more changes to empty list behaviour in the future I want to avoid getting bit by this.

@greg-rychlewski
Copy link
Member Author

rate limit =(. i will re-run later

@josevalim
Copy link
Member

This syntax will require a more recent Elixir version, but we can use https://www.erlang.org/docs/23/man/lists#seq-3 meanwhile.

@greg-rychlewski
Copy link
Member Author

thank you :)

@greg-rychlewski
Copy link
Member Author

@josevalim is it alright if I merge this one?

@greg-rychlewski greg-rychlewski merged commit 1f631fc into elixir-ecto:master Oct 11, 2024
11 checks passed
dkuku pushed a commit to dkuku/ecto_sql that referenced this pull request Nov 4, 2024
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.

2 participants