Introducing jOOQ settings
jOOQ supports a bunch of optional settings (org.jooq.conf.Settings
) that are mostly used to customize rendered SQL. While all these settings rely on defaults that have been carefully chosen for a wide range of cases, there are still situations when we have to alter them.
If you prefer the declarative approach, then you can alter these settings via an XML file, named jooq-settings.xml
, placed in the application classpath. For instance, if the rendered SQL doesn't contain the name of the catalog/schema, then jooq-settings.xml
will be as follows:
<?xml version="1.0" encoding="UTF-8"?> <settings> <renderCatalog>false</renderCatalog> <renderSchema>false</renderSchema> </settings>
Without these settings, jOOQ renders the name of the catalog/schema for each generated SQL. Here is an example in SQL Server:
- Without these settings, jOOQ renders
[classicmodels...