-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
SQLite doesn't like double parens #396
Comments
SELECT t1."id"
FROM "users" AS t1
WHERE Exists((SELECT t2."id" FROM "users" AS t2)) |
Nice, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This sample program shows the problem
Func always wraps the nodes in parens: https:/coleifer/peewee/blob/2.2.5/peewee.py#L1141
And nested selects are always in parens: https:/coleifer/peewee/blob/2.2.5/peewee.py#L1174
One approach might just be in the
isinstance(node, Func)
detect if the sql to wrap alreadystartswith('(')
andendswith(')')
, but maybe there is something more clever.The text was updated successfully, but these errors were encountered: