The Query DSL does not allow to express easily OR conditions.
For instance, in order to keep the rows where the value of the column "A" is either null or a string in lower case, we have to write :
Query
.select()
.from(table)
.where("A").asStr().match(str -> str == null || str.equals(str.toLowerCase());
The built-in methods such as isInstanceOf,in or isTrue cannot be used anymore and must be re-written by the user.
It would be better to write something like :
Query
.select()
.from(table)
.where("A").isNull().or().asStr().isInLowerCase();
or even :
Query
.select()
.from(table)
.where("A").asStr().match(str -> str.isNull() || str.isInLowerCase());
instead.
Either way, the current DSL makes predicate composition difficult and should be adapted.
The Query DSL does not allow to express easily OR conditions.
For instance, in order to keep the rows where the value of the column "A" is either null or a string in lower case, we have to write :
The built-in methods such as
isInstanceOf,inorisTruecannot be used anymore and must be re-written by the user.It would be better to write something like :
or even :
instead.
Either way, the current DSL makes predicate composition difficult and should be adapted.