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:
BatchedConnection
-
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
ConstructorDescriptionBatchedPreparedStatement(String sql, BatchedConnection connection, PreparedStatement delegate)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addBatch()
void
void
void
close()
boolean
execute()
boolean
boolean
boolean
boolean
int[]
long[]
long
long
long
executeLargeUpdate(String s, int autoGeneratedKeys)
long
executeLargeUpdate(String s, int[] columnIndexes)
long
executeLargeUpdate(String s, String[] columnNames)
executeQuery(String s)
int
int
executeUpdate(String s)
int
executeUpdate(String s, int autoGeneratedKeys)
int
executeUpdate(String s, int[] columnIndexes)
int
executeUpdate(String s, String[] columnNames)
boolean
long
boolean
boolean
getMoreResults(int current)
int
boolean
isWrapperFor(Class<?> iface)
void
setExecuteImmediate(boolean executeImmediate)
<T> T
Methods 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, setURL
Methods 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, wrap
Methods inherited from class org.jooq.tools.jdbc.JDBC41Statement
getObject, getObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
unwrap
in interfaceWrapper
- Overrides:
unwrap
in classDefaultStatement
- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Overrides:
isWrapperFor
in classDefaultStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfacePreparedStatement
- Overrides:
executeUpdate
in classDefaultPreparedStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfacePreparedStatement
- Overrides:
execute
in classDefaultPreparedStatement
- Throws:
SQLException
-
getUpdateCount
- Specified by:
getUpdateCount
in interfaceStatement
- Overrides:
getUpdateCount
in classDefaultStatement
- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdate
in interfacePreparedStatement
- Overrides:
executeLargeUpdate
in classDefaultPreparedStatement
- Throws:
SQLException
-
getLargeUpdateCount
- Specified by:
getLargeUpdateCount
in interfaceStatement
- Overrides:
getLargeUpdateCount
in classDefaultStatement
- Throws:
SQLException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceStatement
- Overrides:
close
in classDefaultStatement
- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResults
in interfaceStatement
- Overrides:
getMoreResults
in classDefaultStatement
- Throws:
SQLException
-
getMoreResults
- Specified by:
getMoreResults
in interfaceStatement
- Overrides:
getMoreResults
in classDefaultStatement
- Throws:
SQLException
-
addBatch
- Specified by:
addBatch
in interfacePreparedStatement
- Overrides:
addBatch
in classDefaultPreparedStatement
- Throws:
SQLException
-
clearBatch
- Specified by:
clearBatch
in interfaceStatement
- Overrides:
clearBatch
in classDefaultStatement
- Throws:
SQLException
-
executeBatch
- Specified by:
executeBatch
in interfaceStatement
- Overrides:
executeBatch
in classDefaultStatement
- Throws:
SQLException
-
executeLargeBatch
- Specified by:
executeLargeBatch
in interfaceStatement
- Overrides:
executeLargeBatch
in classDefaultStatement
- Throws:
SQLException
-
addBatch
- Specified by:
addBatch
in interfaceStatement
- Overrides:
addBatch
in classDefaultStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Overrides:
execute
in classDefaultStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Overrides:
execute
in classDefaultStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Overrides:
execute
in classDefaultStatement
- Throws:
SQLException
-
execute
- Specified by:
execute
in interfaceStatement
- Overrides:
execute
in classDefaultStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Overrides:
executeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Overrides:
executeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Overrides:
executeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeUpdate
- Specified by:
executeUpdate
in interfaceStatement
- Overrides:
executeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdate
in interfaceStatement
- Overrides:
executeLargeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdate
in interfaceStatement
- Overrides:
executeLargeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdate
in interfaceStatement
- Overrides:
executeLargeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeLargeUpdate
- Specified by:
executeLargeUpdate
in interfaceStatement
- Overrides:
executeLargeUpdate
in classDefaultStatement
- Throws:
SQLException
-
executeQuery
- Specified by:
executeQuery
in interfaceStatement
- Overrides:
executeQuery
in classDefaultStatement
- Throws:
SQLException
-
executeQuery
- Specified by:
executeQuery
in interfacePreparedStatement
- Overrides:
executeQuery
in classDefaultPreparedStatement
- Throws:
SQLException
-
getResultSet
- Specified by:
getResultSet
in interfaceStatement
- Overrides:
getResultSet
in classDefaultStatement
- Throws:
SQLException
-
getGeneratedKeys
- Specified by:
getGeneratedKeys
in interfaceStatement
- Overrides:
getGeneratedKeys
in classDefaultStatement
- Throws:
SQLException
-