Comment 0 for bug 788125

Revision history for this message
Samppa Saarela (samppa-saarela) wrote :

There should be an easy to find access point for different kind of all "special" expressions. Currently different kinds of special expressions are scattered here and there and are sometimes hard to find/remember. For example case-when (CaseBuilder), shortcut for disjunction (BooleanBuilder), NumberTemplate/TemplateExpression (for DB-specific or custom functions not found in interfaces).

E.g. Queries.case(),
Queries.anyOf(Predicate... args),
Queries.integerTemplate(String template, Expression<?>... args) - sortcut for NumberTemplate<Integer>,
Queries.constant(T value) - shortcut for ConstantImpl or null-expression
Queries.subQuery()

This utility class should probably not be a static library but allow extensions for different query languages and backends as well as parametrized sub query type.