Development versions: 3.12

Previous sections showed how the SQL generation of bind values can be controlled, e.g. by forcing them to be inlined, or by running a static JDBC statement.

Sometimes, inlining needs to be enforced dynamically, depending on the query content. This is the case when there are a great number of bind variables. Known vendor-specific limits are:

  • Access : 768
  • Ingres : 1024
  • Oracle : 32767
  • PostgreSQL : 32767
  • SQLite : 999
  • SQL Server : 2100
  • Sybase ASE : 2000

By default, jOOQ will automatically inline all bind variables in any SQL statement, once these thresholds have been reached. However, it is possible to override this default and provide a setting to re-define a global threshold for all dialects.

Programmatic configuration

Settings settings = new Settings()
    .withInlineThreshold(100); // Defaults to 0, which means the default thresholds are applied

XML configuration

<settings xmlns="http://www.jooq.org/xsd/jooq-runtime-3.11.2.xsd">
  <inlineThreshold>100</inlineThreshold>
</settings>
The jOOQ Logo