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

Unify SelectStatement and WithQuery #813

Open
bouk opened this issue Sep 6, 2024 · 0 comments · May be fixed by #814
Open

Unify SelectStatement and WithQuery #813

bouk opened this issue Sep 6, 2024 · 0 comments · May be fixed by #814

Comments

@bouk
Copy link

bouk commented Sep 6, 2024

Motivation

WithQuery is currently a separate entity from SelectStatement which is unfortunate, because it restricts where you can use it, i.e. I'd like to use a WithQuery as a FROM with from_subquery in another query but I don't believe I can, because only SelectStatements are accepted.

pub fn from_subquery<T>(&mut self, query: SelectStatement, alias: T) -> &mut Self

Proposed Solutions

Move with_clause into SelectStatement/UpdateStatement/DeleteStatement/InsertStatement instead of having a separate code path for it.

Additional Information

bouk added a commit to bouk/sea-query that referenced this issue Sep 6, 2024
Instead, move the with clause into insert/update/select/delete.

Fixes SeaQL#813
@bouk bouk linked a pull request Sep 6, 2024 that will close this issue
1 task
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 a pull request may close this issue.

1 participant