Available in versions: Dev (3.17) | Latest (3.16) | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10 | 3.9 | 3.8 | 3.7
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.
Custom Settings
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The jOOQ Configuration allows for some optional configuration elements to be used by advanced users. The org.jooq.conf.Settings class is a JAXB-annotated type, that can be provided to a Configuration in several ways:
- In the DSLContext constructor (
DSL.using()
). This will override default settings below - in the org.jooq.impl.DefaultConfiguration constructor. This will override default settings below
- From a location specified by a JVM parameter: -Dorg.jooq.settings
- From the classpath at /jooq-settings.xml
- From the settings defaults, as specified in https://www.jooq.org/xsd/jooq-runtime-3.16.0.xsd
The most specific settings for a given context will apply.
If you wish to configure your settings through XML, but explicitly load them for a given Configuration
, you can do so as well, using JAXB:
Settings settings = JAXB.unmarshal(new File("/path/to/settings.xml"), Settings.class);
Example
For example, if you want to indicate to jOOQ, that it should inline all bind variables, and execute static java.sql.Statement instead of binding its variables to java.sql.PreparedStatement, you can do so by creating the following DSLContext:
Settings settings = new Settings(); settings.setStatementType(StatementType.STATIC_STATEMENT); DSLContext create = DSL.using(connection, dialect, settings);
More details
Please refer to the jOOQ runtime configuration XSD for more details:
https://www.jooq.org/xsd/jooq-runtime-3.16.0.xsd
Table of contents
- 4.2.7.1.
- Auto-attach Records
- 4.2.7.2.
- Auto-inline bind values (new)
- 4.2.7.3.
- Backslash Escaping
- 4.2.7.4.
- Batch size
- 4.2.7.5.
- Execute Logging
- 4.2.7.6.
- Fetch Warnings
- 4.2.7.7.
- Identifier style
- 4.2.7.8.
- Implicit join type
- 4.2.7.9.
- Inline Threshold
- 4.2.7.10.
- IN-list Padding
- 4.2.7.11.
- Interpreter Configuration
- 4.2.7.12.
- JDBC Flags
- 4.2.7.13.
- Keyword style
- 4.2.7.14.
- Listener Invocation Order
- 4.2.7.15.
- Locales
- 4.2.7.16.
- Map JPA Annotations
- 4.2.7.17.
- Object qualification
- 4.2.7.18.
- Optimistic Locking
- 4.2.7.19.
- Parameter name prefix
- 4.2.7.20.
- Parameter types
- 4.2.7.21.
- Parser Configuration
- 4.2.7.22.
- Reflection caching
- 4.2.7.23.
- Return All Columns On Store
- 4.2.7.24.
- Return Identity Value On Store
- 4.2.7.25.
- Runtime catalog, schema and table mapping
- 4.2.7.26.
- Scalar subqueries for stored functions
- 4.2.7.27.
- Statement Type
- 4.2.7.28.
- Updatable Primary Keys
The jOOQ User Manual : SQL building : The DSLContext API : Custom Settings | previous : next |
Feedback
Do you have any feedback about this page? We'd love to hear it!