-
-
Notifications
You must be signed in to change notification settings - Fork 90
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
I can't find a way to express sub query expressions, for examples:
# ANY / SOME / ALL subquery
...
WHERE book_type = ANY (?)
# EXISTS subquery
...
WHERE EXISTS(
SELECT 1 FROM ...
)
Currenty, I workaround this by using F() but I don't think this is the corect approach:
sm.Where(
psql.F("EXISTS", existQuery),
)
I think we should add dedicated starters for those expressions, such as Exists(...Expression), Any(...Expression), etc. Both PostgreSQL and MySQL support those operator, while SQLite supports EXISTS only.
Actually, IN and NOT IN belong to the same category of operators and are already supported through operator chaining but other operators that I mention can't be implemented like that.
Bonus: I also can’t find a way to express the unary minus operator (-). Should this be added as a starter as well?
jacobmolby
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed