This is experimental functionality, and as such subject to change. Use at your own risk!
This documentation is for the unreleased development version of jOOQ. Click on the above version links to get this documentation for a supported version of jOOQ.
Flatten DECODE
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The DECODE function can be nested. In some cases, however, that nesting is unnecessary. Hence, we flatten the function calls.
Using Settings.transformPatternsFlattenDecode, the following transformations can be achieved:
-- With Settings.transformPatternsFlattenDecode active, this: SELECT DECODE(a, b, c, DECODE(a, d, e)), DECODE(a, b, c, DECODE(a, d, e, f)) FROM tab; -- ... is transformed into the equivalent expression: SELECT DECODE(a, b, c, d, e), DECODE(a, b, c, d, e, f) FROM tab;
Feedback
Do you have any feedback about this page? We'd love to hear it!