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.
Extended types
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
In addition to all the data types specified by the JDBC specification such as SMALLINT
, INTEGER
, BIGINT
, VARCHAR
, and many more, jOOQ includes support for additional standard SQL data types, which JDBC ignores.
These data types are very convenient when they work out of the box, although you may prefer to roll your own, e.g. using converters or bindings.
Specifically, in the case of spatial types, which are available to the commercial editions only, you may want to opt out of jOOQ's code generation support when you're using the jOOQ Open Source Edition.
Support for these four data types can be configured in code generation:
-
interval types (i.e.
org.jooq.types.Interval
and subtypes) -
json types (i.e.
org.jooq.JSON
andorg.jooq.JSONB
) -
spatial types (i.e.
org.jooq.Spatial
and subtypes) -
xml types (i.e.
org.jooq.XML
)
By default, all of the above data types are supported, and support is enabled. To disable support, use:
<configuration> <generator> <generate> <intervalTypes>false</intervalTypes> <jsonTypes>false</jsonTypes> <spatialTypes>false</spatialTypes> <xmlTypes>false</xmlTypes> </generate> </generator> </configuration>
See the configuration XSD, standalone code generation, and maven code generation for more details.
new org.jooq.meta.jaxb.Configuration() .withGenerator( new Generate() .withIntervalTypes(false) .withJsonTypes(false) .withSpatialTypes(false) .withXmlTypes(false) )
See the configuration XSD and programmatic code generation for more details.
import org.jooq.meta.jaxb.* configuration { generator { generate { isIntervalTypes = false isJsonTypes = false isSpatialTypes = false isXmlTypes = false } } }
See the configuration XSD and gradle code generation for more details.
configuration { generator { generate { intervalTypes = false jsonTypes = false spatialTypes = false xmlTypes = false } } }
See the configuration XSD and gradle code generation for more details.
generationTool { generator { generate { intervalTypes = false jsonTypes = false spatialTypes = false xmlTypes = false } } }
See the configuration XSD and gradle code generation for more details.
Feedback
Do you have any feedback about this page? We'd love to hear it!