java.lang.Object
org.jooq.tools.jdbc.JDBC41Statement
org.jooq.tools.jdbc.DefaultStatement
org.jooq.tools.jdbc.DefaultPreparedStatement
org.jooq.tools.jdbc.BatchedPreparedStatement
- All Implemented Interfaces:
AutoCloseable,PreparedStatement,Statement,Wrapper
A batched statement.
This statement doesn't execute immediately, but buffers all bind variables in
batch, delaying execution until a new SQL string is encountered. See
BatchedConnection for details.
- Author:
- Lukas Eder
- See Also:
-
Field Summary
Fields inherited from interface java.sql.Statement
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO -
Constructor Summary
ConstructorsConstructorDescriptionBatchedPreparedStatement(String sql, BatchedConnection connection, PreparedStatement delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBatch()voidvoidvoidclose()booleanexecute()booleanbooleanbooleanbooleanint[]long[]longlonglongexecuteLargeUpdate(String s, int autoGeneratedKeys) longexecuteLargeUpdate(String s, int[] columnIndexes) longexecuteLargeUpdate(String s, String[] columnNames) intintintexecuteUpdate(String s, int autoGeneratedKeys) intexecuteUpdate(String s, int[] columnIndexes) intexecuteUpdate(String s, String[] columnNames) booleanlongbooleanbooleangetMoreResults(int current) intbooleanisWrapperFor(Class<?> iface) voidsetExecuteImmediate(boolean executeImmediate) <T> TMethods inherited from class org.jooq.tools.jdbc.DefaultPreparedStatement
clearParameters, getDelegate, getDelegatePreparedStatement, getMetaData, getParameterMetaData, setArray, setAsciiStream, setAsciiStream, setAsciiStream, setBigDecimal, setBinaryStream, setBinaryStream, setBinaryStream, setBlob, setBlob, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setCharacterStream, setCharacterStream, setClob, setClob, setClob, setDate, setDate, setDouble, setFloat, setInt, setLong, setNCharacterStream, setNCharacterStream, setNClob, setNClob, setNClob, setNString, setNull, setNull, setObject, setObject, setObject, setObject, setObject, setRef, setRowId, setShort, setSQLXML, setString, setTime, setTime, setTimestamp, setTimestamp, setUnicodeStream, setURLMethods inherited from class org.jooq.tools.jdbc.DefaultStatement
cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, getConnection, getDelegateStatement, getFetchDirection, getFetchSize, getLargeMaxRows, getMaxFieldSize, getMaxRows, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout, wrapMethods inherited from class org.jooq.tools.jdbc.JDBC41Statement
getObject, getObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.Statement
cancel, clearWarnings, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, getConnection, getFetchDirection, getFetchSize, getLargeMaxRows, getMaxFieldSize, getMaxRows, getQueryTimeout, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeout
-
Constructor Details
-
BatchedPreparedStatement
public BatchedPreparedStatement(String sql, BatchedConnection connection, PreparedStatement delegate)
-
-
Method Details
-
getBatchedConnection
- Throws:
SQLException
-
getExecuteImmediate
public boolean getExecuteImmediate() -
setExecuteImmediate
public void setExecuteImmediate(boolean executeImmediate) -
unwrap
- Specified by:
unwrapin interfaceWrapper- Overrides:
unwrapin classDefaultStatement- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Overrides:
isWrapperForin classDefaultStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfacePreparedStatement- Overrides:
executeUpdatein classDefaultPreparedStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfacePreparedStatement- Overrides:
executein classDefaultPreparedStatement- Throws:
SQLException
-
getUpdateCount
- Specified by:
getUpdateCountin interfaceStatement- Overrides:
getUpdateCountin classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdatein interfacePreparedStatement- Overrides:
executeLargeUpdatein classDefaultPreparedStatement- Throws:
SQLException
-
getLargeUpdateCount
- Specified by:
getLargeUpdateCountin interfaceStatement- Overrides:
getLargeUpdateCountin classDefaultStatement- Throws:
SQLException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceStatement- Overrides:
closein classDefaultStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Overrides:
getMoreResultsin classDefaultStatement- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResultsin interfaceStatement- Overrides:
getMoreResultsin classDefaultStatement- Throws:
SQLException
-
addBatch
- Specified by:
addBatchin interfacePreparedStatement- Overrides:
addBatchin classDefaultPreparedStatement- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatchin interfaceStatement- Overrides:
clearBatchin classDefaultStatement- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatchin interfaceStatement- Overrides:
executeBatchin classDefaultStatement- Throws:
SQLException
-
executeLargeBatch
- Specified by:
executeLargeBatchin interfaceStatement- Overrides:
executeLargeBatchin classDefaultStatement- Throws:
SQLException
-
addBatch
- Specified by:
addBatchin interfaceStatement- Overrides:
addBatchin classDefaultStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
execute
- Specified by:
executein interfaceStatement- Overrides:
executein classDefaultStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdatein interfaceStatement- Overrides:
executeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdatein interfaceStatement- Overrides:
executeLargeUpdatein classDefaultStatement- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfaceStatement- Overrides:
executeQueryin classDefaultStatement- Throws:
SQLException
-
executeQuery
- Specified by:
executeQueryin interfacePreparedStatement- Overrides:
executeQueryin classDefaultPreparedStatement- Throws:
SQLException
-
getResultSet
- Specified by:
getResultSetin interfaceStatement- Overrides:
getResultSetin classDefaultStatement- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeysin interfaceStatement- Overrides:
getGeneratedKeysin classDefaultStatement- Throws:
SQLException
-