Available in versions: Dev (3.21)
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.
Redacted columns
Applies to ❌ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
jOOQ's code generator may decide that a column is redacted, in case of which its formatted content will be changed. This is especially useful to prevent leakage of sensitive information into debug logs, etc.
// Tables, records, etc. still contain the column like any other: Customer customer = create.selectFrom(CUSTOMER).where(CUSTOMER.ID.eq(123)).fetchOne(); assertEquals("John", customer.getFirstName()); assertEquals("Doe", customer.getLastName()); assertEquals("1234 5678 9012 3456", customer.getCreditCardNo()); // But printing out the customer will redact sensitive information: System.out.println(customer);
The output of the above may be:
+------------+-----------+----------------+ | first_name | last_name | credit_card_no | +------------+-----------+----------------+ | John | Doe | **** | +------------+-----------+----------------+
The fact whether data is redacted is governed by the DataType.redacted()
flag.
By default, all such redacted
fields will be redacted in:
By specifying Settings.redact, it is possible to apply redacting also to:
Feedback
Do you have any feedback about this page? We'd love to hear it!