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

Union proposal #128

Merged
merged 2 commits into from
Sep 10, 2021
Merged

Union proposal #128

merged 2 commits into from
Sep 10, 2021

Conversation

nappa85
Copy link

@nappa85 nappa85 commented Sep 7, 2021

This PR is to discuss an union implementation.
Unions are supported equally by MySQL, PostgreSQL and SQLite, with the same syntax.
Unions are by default distinct, MySQL has an optional UNION DISTINCT but it has no differences from a simple UNION.
Instead, UNION ALL doesn't filter results.

In this quite simple implementation, I've put the union(s) before the order by statement, because union queries supports ordering of union-ed data.
To obtain a more complex behavior, users can use union-ed queries as sub-queries of a parent query.

@tyt2y3 tyt2y3 merged commit b7ba1f3 into SeaQL:master Sep 10, 2021
@nappa85 nappa85 deleted the union branch September 13, 2021 09:27
callym pushed a commit to callym/sea-query that referenced this pull request Oct 25, 2021
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