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 multiple lists for an IN clause #997

Merged
merged 7 commits into from
Jun 20, 2020

Conversation

AnEmortalKid
Copy link
Contributor

Fixes #737
Fixes #953

| token=<S_CHAR_LITERAL> { rightExpression = new StringValue(token.image); }
| "(" (LOOKAHEAD(3) rightItemsList=SubSelect() | rightItemsList=SimpleExpressionList() ) ")")
(
// syntactic lookahead for a multi expression list, ie: ((a,b),(c,d))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I read through the options for lookahead and this seemed pretty nifty: https://javacc.github.io/javacc/tutorials/lookahead.html#syntactic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

However, if the potential performance hit from this is a concern, I can try to use a LOOKAHEAD(2, "(" "(") and see how that works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or a vanilla plain LOOKAHEAD(3) multiExpressionList = MultiInExpressions() also works.

@coveralls
Copy link

coveralls commented Jun 19, 2020

Coverage Status

Coverage increased (+0.06%) to 83.522% when pulling e12f85f on AnEmortalKid:multi-ins into d34c885 on JSQLParser:master.

@wumpz wumpz merged commit 5de4ae5 into JSQLParser:master Jun 20, 2020
@AnEmortalKid
Copy link
Contributor Author

@wumpz thank you 👏 , I can go back through some issues and see which other ones could be closed by this!

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.

cannot support condition (a,b) in ((1,2),(3,4)) multiple columns IN operation is not support
3 participants