Skip to content

fix: treat single subselect properly#357

Open
nic11 wants to merge 1 commit into
doug-martin:masterfrom
nic11:fix-double-braces
Open

fix: treat single subselect properly#357
nic11 wants to merge 1 commit into
doug-martin:masterfrom
nic11:fix-double-braces

Conversation

@nic11

@nic11 nic11 commented Sep 22, 2022

Copy link
Copy Markdown
Contributor

Fixes #352


expressionTestCase{val: ident.In(ae), sql: `("a" IN ((SELECT "id" FROM "test2")))`},
expressionTestCase{val: ident.In(ae), sql: `("a" IN ((SELECT "id" FROM "test2")))`, isPrepared: true},
expressionTestCase{val: ident.In(ae), sql: `("a" IN (SELECT "id" FROM "test2"))`},

@nic11 nic11 Sep 22, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a expressionTestCase{val: ident.Eq(ae), sql: `("a" IN (SELECT "id" FROM "test2"))`}, above, so maybe this was intended for some reason(??)

But looks strange anyway, I don't think that this should be a desired behaviour

@gwd

gwd commented May 14, 2023

Copy link
Copy Markdown

Any chance we can get this merged? I just spent several hours trying to figure out why my query was only getting a single result, only to find the extra paren made the difference.

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.

How to generate nested select statements

2 participants