- All Superinterfaces:
Condition,QueryPart,Serializable
- Enclosing class:
- QOM
The
NOT SIMILAR TO operator.-
Method Summary
Modifier and TypeMethodDescriptionField<?>$arg1()default Condition$arg2()default Condition$arg3()default Conditiondefault @Nullable Character$escape()$pattern()default QueryPartTraverse aQueryParthierarchy and recursively replace its elements by alternatives.default <T> Tdefault @NotNull Field<?>$value()
-
Method Details
-
$value
-
$pattern
-
$escape
-
$arg1
Field<?> $arg1() -
$arg2
-
$arg3
Character $arg3() -
$arg1
-
$arg2
-
$arg3
-
constructor
-
$traverse
Description copied from interface:QueryPartTraverser thisQueryPartexpression tree using a composableTraverser, producing a result.This offers a generic way to traverse expression trees to translate the tree to arbitrary other data structures. The simplest traversal would just count all the tree elements:
int count = CUSTOMER.NAME.eq(1).$traverse(0, (i, p) -> i + 1);The same can be achieved by translating the JDK
CollectorAPI to theTraverserAPI usingTraversers.collecting(Collector).CUSTOMER.NAME.eq(1).$traverse(Traversers.collecting(Collectors.counting()));Unlike a
Collector, aTraverseris optimised for tree traversal, not stream traversal:- Is not designed for parallelism
- It can
Traverser.abort()traversal early when the result can be produced early (e.g. when runningTraversers.containing(QueryPart), and a result has been found). - It can decide whether to
Traverser.recurse()into aQueryPartsubtree, or whether that is not necessary or even undesirable, e.g. to prevent entering new subquery scopes. - Unlike a Collector, which can use its
Collector.accumulator()to accumulate each element only once, in tree traversal, it's desirable to be able to distinguish between accumulating an itemTraverser.before()orTraverser.after()recursing into it. This is useful e.g. to wrap each tree node in XML opening and closing tags.
This is a commercial jOOQ edition only feature.
-
$replace
Description copied from interface:QueryPartTraverse aQueryParthierarchy and recursively replace its elements by alternatives.This is a commercial jOOQ edition only feature.
-