Is there a dsl for parenthesis?

when using or condition, parenthesis needed.
currently i am using concatenating.
x(" (" + path("t", "name").eq(s("aaa")).or( path("t", "name").eq(s("aaa"))) + ") ")
is there a dsl method?
like this.
x( paren (path("t", "name").eq(s("aaa")).or( path("t", "name").eq(s("aaa")))))

There’s the sub method on Expression. It was initially intended for subselect clauses but works for that use case as well since it just surrounds any Expression in parenthesis.

sub method is not for expression but for statement. is there a method for expression?

ah my bad you’re right it’s taking a Statement. So no, there’s no dedicated method in the DSL to wrap in parenthesis.

ok. i see.
thanks a lot.

You should really consider adding this feature, ran into the same problem and now use something like:

Expression.x("(" + expression.toString() + ")")

looks ugly to my eyes.

You’re right, a bit ugly.
I created the par() method in Expression for that, see
That will be in 2.3 :smile:

Cool, thanks. Will 2.3 be available for the community edition?

yeah, in general the SDKs don’t have any particular restriction in regards to community vs enterprise editions of the server (as in, they’ll adapt to what you have)