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.
Unreachable DECODE clauses
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
When a DECODE functino contains unreachable arguments, we can remove them.
Using Settings.transformPatternsUnreachableDecodeClauses, the following transformations can be achieved:
-- With Settings.transformPatternsUnreachableDecodeClauses active, this: SELECT DECODE(a, b, 1, c, 2, b, 3), DECODE(a, b, 1, c, 2, b, 3, 4) FROM tab; -- ... is transformed into the equivalent expression: SELECT DECODE(a, b, 1, c, 2), DECODE(a, b, 1, c, 2, 4) FROM tab;
Feedback
Do you have any feedback about this page? We'd love to hear it!