java.lang.Object
org.jooq.tools.jdbc.JDBC41Connection
org.jooq.tools.jdbc.DefaultConnection
org.jooq.tools.jdbc.BatchedConnection
- All Implemented Interfaces:
- AutoCloseable,- Connection,- Wrapper
A batching connection.
 
 This connection buffers consecutive identical prepared statements for
 DELETE, INSERT, MERGE,
 UPDATE statements, instead of allowing for them to be executed
 directly.
 
 Calls to PreparedStatement.executeUpdate() or
 PreparedStatement.execute() are replaced by
 PreparedStatement.addBatch(). The update count of such operations is
 always zero, and cannot be retrieved later on. When any of the following
 events happen, the batch is executed using Statement.executeBatch():
 
- The close()method is called (the call is not delegated to the wrapped connection).
- A Connection.prepareStatement(String)call is made with a different SQL string.
- Any other type of statement is created or other API is called, such as
 commit().
- Author:
- Lukas Eder
- 
Field SummaryFields inherited from interface java.sql.ConnectionTRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
- 
Constructor SummaryConstructorsConstructorDescriptionBatchedConnection(Connection delegate) BatchedConnection(Connection delegate, int batchSize) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidclose()voidcommit()createStatement(int resultSetType, int resultSetConcurrency) createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) booleangetClientInfo(String name) intintbooleanbooleanisValid(int timeout) booleanisWrapperFor(Class<?> iface) prepareCall(String sql) prepareCall(String sql, int resultSetType, int resultSetConcurrency) prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement(String sql) prepareStatement(String sql, int autoGeneratedKeys) prepareStatement(String sql, int[] columnIndexes) prepareStatement(String sql, int resultSetType, int resultSetConcurrency) prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) prepareStatement(String sql, String[] columnNames) voidreleaseSavepoint(Savepoint savepoint) voidrollback()voidvoidsetAutoCommit(boolean autoCommit) voidsetCatalog(String catalog) voidsetClientInfo(String name, String value) voidsetClientInfo(Properties properties) voidsetHoldability(int holdability) voidsetReadOnly(boolean readOnly) setSavepoint(String name) voidsetTransactionIsolation(int level) voidsetTypeMap(Map<String, Class<?>> map) <T> TMethods inherited from class org.jooq.tools.jdbc.DefaultConnectionabort, beginRequest, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, endRequest, getDelegate, getMetaData, getNetworkTimeout, getSchema, isClosed, nativeSQL, setNetworkTimeout, setSchema, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
- 
Constructor Details- 
BatchedConnection
- 
BatchedConnection
 
- 
- 
Method Details- 
unwrap- Specified by:
- unwrapin interface- Wrapper
- Overrides:
- unwrapin class- DefaultConnection
- Throws:
- SQLException
 
- 
isWrapperFor- Specified by:
- isWrapperForin interface- Wrapper
- Overrides:
- isWrapperForin class- DefaultConnection
- Throws:
- SQLException
 
- 
createStatement- Specified by:
- createStatementin interface- Connection
- Overrides:
- createStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
createStatement- Specified by:
- createStatementin interface- Connection
- Overrides:
- createStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
createStatementpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
- createStatementin interface- Connection
- Overrides:
- createStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareStatementpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
- prepareStatementin interface- Connection
- Overrides:
- prepareStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareStatementpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
- prepareStatementin interface- Connection
- Overrides:
- prepareStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareStatement- Specified by:
- prepareStatementin interface- Connection
- Overrides:
- prepareStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareStatement- Specified by:
- prepareStatementin interface- Connection
- Overrides:
- prepareStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareStatement- Specified by:
- prepareStatementin interface- Connection
- Overrides:
- prepareStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareCall- Specified by:
- prepareCallin interface- Connection
- Overrides:
- prepareCallin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareCallpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException - Specified by:
- prepareCallin interface- Connection
- Overrides:
- prepareCallin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareCallpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException - Specified by:
- prepareCallin interface- Connection
- Overrides:
- prepareCallin class- DefaultConnection
- Throws:
- SQLException
 
- 
prepareStatement- Specified by:
- prepareStatementin interface- Connection
- Overrides:
- prepareStatementin class- DefaultConnection
- Throws:
- SQLException
 
- 
commit- Specified by:
- commitin interface- Connection
- Overrides:
- commitin class- DefaultConnection
- Throws:
- SQLException
 
- 
rollback- Specified by:
- rollbackin interface- Connection
- Overrides:
- rollbackin class- DefaultConnection
- Throws:
- SQLException
 
- 
rollback- Specified by:
- rollbackin interface- Connection
- Overrides:
- rollbackin class- DefaultConnection
- Throws:
- SQLException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Connection
- Overrides:
- closein class- DefaultConnection
- Throws:
- SQLException
 
- 
setSavepoint- Specified by:
- setSavepointin interface- Connection
- Overrides:
- setSavepointin class- DefaultConnection
- Throws:
- SQLException
 
- 
setSavepoint- Specified by:
- setSavepointin interface- Connection
- Overrides:
- setSavepointin class- DefaultConnection
- Throws:
- SQLException
 
- 
releaseSavepoint- Specified by:
- releaseSavepointin interface- Connection
- Overrides:
- releaseSavepointin class- DefaultConnection
- Throws:
- SQLException
 
- 
setAutoCommit- Specified by:
- setAutoCommitin interface- Connection
- Overrides:
- setAutoCommitin class- DefaultConnection
- Throws:
- SQLException
 
- 
getAutoCommit- Specified by:
- getAutoCommitin interface- Connection
- Overrides:
- getAutoCommitin class- DefaultConnection
- Throws:
- SQLException
 
- 
setReadOnly- Specified by:
- setReadOnlyin interface- Connection
- Overrides:
- setReadOnlyin class- DefaultConnection
- Throws:
- SQLException
 
- 
isReadOnly- Specified by:
- isReadOnlyin interface- Connection
- Overrides:
- isReadOnlyin class- DefaultConnection
- Throws:
- SQLException
 
- 
setCatalog- Specified by:
- setCatalogin interface- Connection
- Overrides:
- setCatalogin class- DefaultConnection
- Throws:
- SQLException
 
- 
getCatalog- Specified by:
- getCatalogin interface- Connection
- Overrides:
- getCatalogin class- DefaultConnection
- Throws:
- SQLException
 
- 
getWarnings- Specified by:
- getWarningsin interface- Connection
- Overrides:
- getWarningsin class- DefaultConnection
- Throws:
- SQLException
 
- 
clearWarnings- Specified by:
- clearWarningsin interface- Connection
- Overrides:
- clearWarningsin class- DefaultConnection
- Throws:
- SQLException
 
- 
setTransactionIsolation- Specified by:
- setTransactionIsolationin interface- Connection
- Overrides:
- setTransactionIsolationin class- DefaultConnection
- Throws:
- SQLException
 
- 
getTransactionIsolation- Specified by:
- getTransactionIsolationin interface- Connection
- Overrides:
- getTransactionIsolationin class- DefaultConnection
- Throws:
- SQLException
 
- 
setTypeMap- Specified by:
- setTypeMapin interface- Connection
- Overrides:
- setTypeMapin class- DefaultConnection
- Throws:
- SQLException
 
- 
getTypeMap- Specified by:
- getTypeMapin interface- Connection
- Overrides:
- getTypeMapin class- DefaultConnection
- Throws:
- SQLException
 
- 
setHoldability- Specified by:
- setHoldabilityin interface- Connection
- Overrides:
- setHoldabilityin class- DefaultConnection
- Throws:
- SQLException
 
- 
getHoldability- Specified by:
- getHoldabilityin interface- Connection
- Overrides:
- getHoldabilityin class- DefaultConnection
- Throws:
- SQLException
 
- 
isValid- Specified by:
- isValidin interface- Connection
- Overrides:
- isValidin class- DefaultConnection
- Throws:
- SQLException
 
- 
setClientInfo- Specified by:
- setClientInfoin interface- Connection
- Overrides:
- setClientInfoin class- DefaultConnection
- Throws:
- SQLClientInfoException
 
- 
setClientInfo- Specified by:
- setClientInfoin interface- Connection
- Overrides:
- setClientInfoin class- DefaultConnection
- Throws:
- SQLClientInfoException
 
- 
getClientInfo- Specified by:
- getClientInfoin interface- Connection
- Overrides:
- getClientInfoin class- DefaultConnection
- Throws:
- SQLException
 
- 
getClientInfo- Specified by:
- getClientInfoin interface- Connection
- Overrides:
- getClientInfoin class- DefaultConnection
- Throws:
- SQLException
 
 
-