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.database| 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<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.
|
execute, getAbsolutePath, getCatalogName, getColumns, getSchemaName, getTableName, skipOnUnsupportedpublic 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<ColumnConfig> ignored, PreparedStatement stmt) throws SQLException, DatabaseException
ExecutablePreparedStatementBaseattachParams in class ExecutablePreparedStatementBaseignored - 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 ExecutablePreparedStatementBaseprotected void executePreparedStatement(PreparedStatement stmt) throws SQLException
executePreparedStatement in class ExecutablePreparedStatementBaseSQLExceptionpublic boolean continueOnError()
Copyright © 2019 Liquibase.org. All rights reserved.