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

Support of subquery #55

Closed
billy1624 opened this issue Jul 23, 2021 · 2 comments · Fixed by #56
Closed

Support of subquery #55

billy1624 opened this issue Jul 23, 2021 · 2 comments · Fixed by #56

Comments

@billy1624
Copy link
Member

Just thinking where we need subquery support in sea-orm

  • select expression: SELECT (SELECT ...) AS subquery FROM ...
  • conditional expression: ... WHERE id IN (SELECT ...) ...
  • from expression: ... FROM (SELECT ...) ...
  • join expression: ... LEFT JOIN (SELECT ...) ON ...

How many kinds of subquery we want to support at this stage? I think supporting "select expression" and "conditional expression" are enough for now.

@tyt2y3
Copy link
Member

tyt2y3 commented Jul 24, 2021

I think as long as SeaQuery support these we are fine.
from_subquery, in_subquery, join_subquery already exists.

@tyt2y3
Copy link
Member

tyt2y3 commented Jul 24, 2021

subquery inside a column expression is weird enough, we might not try until someone has a very good use case

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.

2 participants