Package org.eclipse.net4j.db
Interface BatchedStatement
- All Superinterfaces:
AutoCloseable,PreparedStatement,Statement,Wrapper
A
PreparedStatement that supports batching of parameter sets. A batch is executed when the number of
parameter sets reaches the batch size. The total number of parameter sets submitted to
this statement can be retrieved using getBatchCount(). The total number of rows affected by all
executions of this statement can be retrieved using getTotalResult().
The flush() method can be used to execute all currently pending parameter sets, and the number of
parameter sets that have not yet been executed can be retrieved using getPendingCount().
- Since:
- 4.5
- Author:
- Eike Stepper
- No Implement
- This interface is not intended to be implemented by clients.
- No Extend
- This interface is not intended to be extended by clients.
-
Nested Class Summary
Nested Classes -
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 -
Method Summary
Modifier and TypeMethodDescriptionintflush()Executes all currently pending parameter sets.intReturns the total number of parameter sets submitted to this statement.intReturns the maximum number of parameter sets that can be submitted to this statement before an execution is triggered.intReturns the number of executed JDBC batches.intReturns the number of parameter sets that have not yet been executed.intReturns the total number of rows affected by all executions of this statement.intReturns the number of successful JDBC batch entries whose update count is unknown.Methods inherited from interface java.sql.PreparedStatement
addBatch, clearParameters, execute, executeLargeUpdate, executeQuery, executeUpdate, 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 interface java.sql.Statement
addBatch, cancel, clearBatch, clearWarnings, close, closeOnCompletion, enquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, execute, execute, execute, execute, executeBatch, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUpdate, getConnection, getFetchDirection, getFetchSize, getGeneratedKeys, getLargeMaxRows, getLargeUpdateCount, getMaxFieldSize, getMaxRows, getMoreResults, getMoreResults, getQueryTimeout, getResultSet, getResultSetConcurrency, getResultSetHoldability, getResultSetType, getUpdateCount, getWarnings, isClosed, isCloseOnCompletion, isPoolable, isSimpleIdentifier, setCursorName, setEscapeProcessing, setFetchDirection, setFetchSize, setLargeMaxRows, setMaxFieldSize, setMaxRows, setPoolable, setQueryTimeoutMethods inherited from interface java.sql.Wrapper
isWrapperFor, unwrap
-
Method Details
-
getBatchSize
int getBatchSize()Returns the maximum number of parameter sets that can be submitted to this statement before an execution is triggered. -
getBatchCount
int getBatchCount()Returns the total number of parameter sets submitted to this statement. -
getTotalResult
int getTotalResult()Returns the total number of rows affected by all executions of this statement. This is the sum of the update counts for each execution. -
getPendingCount
int getPendingCount()Returns the number of parameter sets that have not yet been executed.- Since:
- 4.14
-
getExecutionCount
int getExecutionCount()Returns the number of executed JDBC batches.- Since:
- 4.14
-
getUnknownResultCount
int getUnknownResultCount()Returns the number of successful JDBC batch entries whose update count is unknown.- Since:
- 4.14
-
flush
Executes all currently pending parameter sets.- Throws:
SQLException- Since:
- 4.14
-