All versions: 3.11 | 3.10 | 3.9 | 3.8 | 3.7 | Development versions: 3.12 | Unsupported versions: 3.6 | 3.5 | 3.4 | 3.3 | 3.2

By default, jOOQ will always generate quoted names for all identifiers (even if this manual omits this for readability). For instance:

SELECT "TABLE"."COLUMN" FROM "TABLE" -- SQL standard style
SELECT `TABLE`.`COLUMN` FROM `TABLE` -- MySQL style
SELECT [TABLE].[COLUMN] FROM [TABLE] -- SQL Server style

Quoting has the following effect on identifiers in most (but not all) databases:

  • It allows for using reserved names as object names, e.g. a table called "FROM" is usually possible only when quoted.
  • It allows for using special characters in object names, e.g. a column called "FIRST NAME" can be achieved only with quoting.
  • It turns what are mostly case-insensitive identifiers into case-sensitive ones, e.g. "name" and "NAME" are different identifiers, whereas name and NAME are not. Please consider your database manual to learn what the proper default case and default case sensitivity is.

The renderQuotedNames and renderNameCase settings allow for overriding the name of all identifiers in jOOQ to a consistent style. Possible options are:

RenderQuotedNames

  • ALWAYS: This will quote all identifiers.
  • NEVER: This will not quote any identifiers.

RenderNameCase

  • AS_IS: This will generate all names in their proper case.
  • LOWER: This will transform all names to lower case.
  • UPPER: This will transform all names to upper case.

The two flags are independent of one another. If your database supports quoted, case sensitive identifiers, then using LOWER or UPPER on quoted identifiers may not work.

Programmatic configuration

Settings settings = new Settings()
    .withRenderQuotedNames(RenderQuotedNames.NEVER); // Defaults to ALWAYS
    .withRenderNameCase(RenderNameCase.LOWER);       // Defaults to AS_IS

XML configuration

<settings xmlns="http://www.jooq.org/xsd/jooq-runtime-3.11.2.xsd">
  <renderQuotedNames>NEVER</renderQuotedNames>
  <renderNameCase>LOWER</renderNameCase>
</settings>

The behaviour of this setting is influenced by the renderLocale setting.

The jOOQ Logo