JSR 310 type binding
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Historically, JDBC drivers had poor support for the java.time (JSR 310) types, which is why jOOQ encodes some of them in a more compatible way when binding them to JDBC statements. Most modern drivers support these types natively, and binding them natively may perform better both on the client and on the server. The following settings govern this behaviour:
-
bindOffsetDateTimeType: Whetherjava.time.OffsetDateTimevalues are bound natively usingPreparedStatement.setObject(). The default isfalse, in case of which jOOQ binds them as formatted strings in many dialects. -
bindOffsetTimeType: Whetherjava.time.OffsetTimevalues are bound natively usingPreparedStatement.setObject(). The default isfalse, in case of which jOOQ binds them as formatted strings in many dialects.
See also the manual's sections about the OffsetDateTime and OffsetTime data types.
Example configuration
Settings settings = new Settings()
.withBindOffsetDateTimeType(true) // Defaults to false
.withBindOffsetTimeType(true); // Defaults to false
Feedback
Do you have any feedback about this page? We'd love to hear it!