-
Notifications
You must be signed in to change notification settings - Fork 365
DATAJDBC-490 - Support condition nesting #193
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not to fond of the group
approach. asGroup
would be slightly better.
But the real beef I have is that it reads like a mixture of normal and reverse Polish notation.
I'd rather have constructors or static method, so one may write
or(
left.greaterThan(right).and(<....>),
<some other expression>
)
and the same for AND
.
I also added a commit adding a test that I think should succeed but doesn't.
Thanks for having a look. I also felt that |
We now support condition groups (WHERE (a = b OR b = c) AND (e = f)) with the SQL AST via Condition.group().
Rename ConditionGroup to GroupedCondition. Introduce Conditions.group(…) factory method instead of applying grouping via `condition.group()`. Introduce getter to introspect conditions.
905245e
to
321699e
Compare
We now support condition groups (WHERE (a = b OR b = c) AND (e = f)) with the SQL AST via Condition.group(). Original pull request: #193.
Rename ConditionGroup to GroupedCondition. Introduce Conditions.group(…) factory method instead of applying grouping via `condition.group()`. Introduce getter to introspect conditions. Original pull request: #193.
…UP BY. Original pull request: #193.
Renamed GroupedConditionVisitor to NestedConditionVisitor to match the renamed NestedCondition. Original pull request: #193.
That's on master. |
We now support condition groups
(WHERE (a = b OR b = c) AND (e = f))
with the SQL AST viaCondition.group()
.We should make sure that
Condition.group()
is a sufficiently expressive method name. MaybeasGroup()
or any other variant is more appropriate?Related ticket: DATAJDBC-490.