Available in versions: Dev (3.20) | Latest (3.19)

This is experimental functionality, and as such subject to change. Use at your own risk!

Pattern transformation Replacer

Applies to ❌ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

jOOQ offers a lot of out-of-the-box pattern based replacements like the above examples from the previous section. Please look at the sections about pattern based transformation for more details about individual patterns.

In order to apply pattern transformation explicitly to a org.jooq.QueryPart, just call:

Condition input = BOOK.ID.eq(1).or(BOOK.ID.eq(2));
Condition output = (Condition) input.$replace(Replacers.transformPatterns(configuration));

By default, this will apply the OR to IN transformation, and produce the following output:

BOOK.ID IN (1, 2)
BOOK.ID.in(1, 2)

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo