The jOOQ User Manual. Multiple Pages : SQL building : The DSLContext class : Custom Settings | previous : next |
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 | 2.6
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 http://www.jooq.org/xsd/jooq-runtime-3.9.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:
http://www.jooq.org/xsd/jooq-runtime-3.9.0.xsd
Table of contents
- 4.2.6.1.
- Object qualification
- 4.2.6.2.
- Runtime schema and table mapping
- 4.2.6.3.
- Identifier style
- 4.2.6.4.
- Keyword style
- 4.2.6.5.
- Parameter types
- 4.2.6.6.
- Statement Type
- 4.2.6.7.
- Execute Logging
- 4.2.6.8.
- Optimistic Locking
- 4.2.6.9.
- Auto-attach Records
- 4.2.6.10.
- Updatable Primary Keys
- 4.2.6.11.
- Reflection caching
- 4.2.6.12.
- Fetch Warnings
- 4.2.6.13.
- Return All Columns On Store
- 4.2.6.14.
- Map JPA Annotations
- 4.2.6.15.
- JDBC Flags
- 4.2.6.16.
- IN-list Padding
- 4.2.6.17.
- Backslash Escaping
- 4.2.6.18.
- Scalar subqueries for stored functions
The jOOQ User Manual. Multiple Pages : SQL building : The DSLContext class : Custom Settings | previous : next |