Available in versions: Dev (3.19) | Latest (3.18) | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10 | 3.9
JDBC Flags
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
JDBC statements feature a couple of flags that influence the execution of such a statement. Each of these flags can be configured through jOOQ's org.jooq.Query
and org.jooq.ResultQuery
on a statement-per-statement basis, but there's also the possibility to centrally specify a value for these flags. These are the three flags:
-
queryTimeout
: The JDBC statement timeout in seconds. Corresponds to Query.queryTimeout() or Statement.setQueryTimeout() -
maxRows
: The maximum number of rows returned by the JDBC statement. Corresponds to ResultQuery.maxRows() or Statement.setMaxRows() -
fetchSize
: The number of rows to be buffered by the JDBC ResultSet. Corresponds to ResultQuery.fetchSize() or Statement.setFetchSize()
All of these flags are JDBC-only features with no direct effect on jOOQ. jOOQ only passes them through to the underlying statement.
Programmatic configuration
Settings settings = new Settings() .withQueryTimeout(5) .withMaxRows(1000) .withFetchSize(20);
XML configuration
<settings xmlns="http://www.jooq.org/xsd/jooq-runtime-3.9.0.xsd"> <queryTimeout>5</queryTimeout> <maxRows>1000</maxRows> <fetchSize>20</fetchSize> </settings>
Feedback
Do you have any feedback about this page? We'd love to hear it!