public class BatchDmlExecutablePreparedStatement extends ExecutablePreparedStatementBase
ExecutablePreparedStatementBase
. JDBC batching collects several
executions of DML statements and waits until a certain number of commands has been collected. Then, it sends all
of them to the RDBMS in a single call. Statement.executeBatch()
saves many round-trips between
client and database, often speeding up bulk inserts/updates dramatically if the JDBC driver supports it.ExecutablePreparedStatementBase.LOBContent<T>
coreBundle, database
EMPTY_SQL_STATEMENT
Constructor and Description |
---|
BatchDmlExecutablePreparedStatement(Database database,
String catalogName,
String schemaName,
String tableName,
List<LoadDataColumnConfig> columns,
ChangeSet changeSet,
ResourceAccessor resourceAccessor,
List<ExecutablePreparedStatementBase> statements) |
Modifier and Type | Method and Description |
---|---|
protected void |
attachParams(List<? extends ColumnConfig> ignored,
PreparedStatement stmt)
Sets the list of bind variables for the execution of a DML statement
|
boolean |
continueOnError() |
protected void |
executePreparedStatement(PreparedStatement stmt) |
protected String |
generateSql(List<ColumnConfig> cols) |
List<ExecutablePreparedStatementBase> |
getIndividualStatements()
Returns the individual statements that are currently store in this batch.
|
applyColumnParameter, createStream, execute, getCachedStatement, getCatalogName, getChangeSet, getColumns, getContentLength, getContentLength, getResourceAccessor, getResourceAsStream, getSchemaName, getTableName, skipOnUnsupported, toBinaryStream, toCharacterStream
public BatchDmlExecutablePreparedStatement(Database database, String catalogName, String schemaName, String tableName, List<LoadDataColumnConfig> columns, ChangeSet changeSet, ResourceAccessor resourceAccessor, List<ExecutablePreparedStatementBase> statements)
public List<ExecutablePreparedStatementBase> getIndividualStatements()
protected void attachParams(List<? extends ColumnConfig> ignored, PreparedStatement stmt) throws SQLException, DatabaseException
ExecutablePreparedStatementBase
attachParams
in class ExecutablePreparedStatementBase
ignored
- a list of columns with their designated valuesstmt
- the PreparedStatement to which the values are to be attachedSQLException
- if JDBC objects to a setting (non-existent bind number, wrong column type etc.)DatabaseException
- if an I/O error occurs during the read of LOB valuesprotected String generateSql(List<ColumnConfig> cols)
generateSql
in class ExecutablePreparedStatementBase
protected void executePreparedStatement(PreparedStatement stmt) throws SQLException
executePreparedStatement
in class ExecutablePreparedStatementBase
SQLException
public boolean continueOnError()
Copyright © 2023 Liquibase.org. All rights reserved.