We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
isInstanceOf
in
isTrue
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 text was updated successfully, but these errors were encountered:
With the upcoming type-safe features, this issue will soon be resolved. Indeed, the previous code can now be written as:
private static final ColumnId<String> A = id(String.class, "a"); table.filter(row -> row.get(A) == null || row.get(A).equals(row.get(A).toLowerCase()) );
In my opinion, it is clear enough.
The Query API should also be enhanced to support the following syntax;
Query .select() .from(table) .where(A).isNull().or().isInLowerCase();
Sorry, something went wrong.
echebbi
No branches or pull requests
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
,in
orisTrue
cannot 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.
The text was updated successfully, but these errors were encountered: