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

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

Trivial case abbreviations

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

Case abbreviations like NULLIF() can be trivial, in case of which the function call can be removed.

Using Settings.transformPatternsTrivialCaseAbbreviation, the following transformations can be achieved:

-- With Settings.transformPatternsTrivialCaseAbbreviation active, this:
SELECT
  NVL(NULL, a),
  NULLIF(a, a),
  NULLIF(NULL, a),
  NULLIF(a, NULL)
FROM tab;

-- ... is transformed into the equivalent expression:
SELECT
  a,    -- NVL(NULL, a),
  NULL, -- NULLIF(a, a),
  NULL, -- NULLIF(NULL, a),
  a     -- NULLIF(a, NULL)
FROM tab;

References to this page

Feedback

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

The jOOQ Logo