Available in versions: Dev (3.18)

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.

Trivial bitwise operations

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

bitwise operations can be trivial, in case of which the expression can be removed and replaced by one of the arguments.

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

-- With Settings.transformPatternsTrivialBitwiseOperations active, this:
SELECT
  bitor(a, 0),
  bitand(a, -1),
  bitxor(a, 0),
  bitxor(a, -1)
  -- and many more
FROM tab;

-- ... is transformed into the equivalent expression:
SELECT
  a,        -- bitor(a, 0),
  a,        -- bitand(a, -1),
  a,        -- bitxor(a, 0),
  bitnot(a) -- bitxor(a, -1)
  -- and many more
FROM tab;

Feedback

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

The jOOQ Logo