|The jOOQ User Manual : SQL building : QueryParts : SQL transformation : Pattern based transformation : OR to IN||previous : next|
This is experimental functionality, and as such subject to change. Use at your own risk!
OR to IN
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Using Settings.transformPatternsOrEqToIn, the following transformations can be achieved:
-- With Settings.transformPatternsOrEqToIn active, this: SELECT * FROM tab WHERE x = a OR x = b OR x = c; -- ... is transformed into the equivalent expression: SELECT * FROM tab WHERE x IN (a, b, c);
See also AND to NOT IN