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

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:
  bitor(a, 0),
  bitand(a, -1),
  bitxor(a, 0),
  bitxor(a, -1)
  -- and many more
FROM tab;

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


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

The jOOQ Logo