public final class BatchPreparedStatementExecutor extends Object
| Constructor and Description |
|---|
BatchPreparedStatementExecutor(org.apache.shardingsphere.mode.metadata.MetaDataContexts metaDataContexts,
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor jdbcExecutor,
String schemaName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBatchForExecutionUnits(Collection<org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit> executionUnits)
Add batch for execution units.
|
void |
clear()
Clear.
|
int[] |
executeBatch(org.apache.shardingsphere.infra.binder.statement.SQLStatementContext<?> sqlStatementContext)
Execute batch.
|
List<List<Object>> |
getParameterSet(Statement statement)
Get parameter sets.
|
List<Statement> |
getStatements()
Get statements.
|
void |
init(org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext<org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit> executionGroupContext)
Initialize executor.
|
public BatchPreparedStatementExecutor(org.apache.shardingsphere.mode.metadata.MetaDataContexts metaDataContexts,
org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutor jdbcExecutor,
String schemaName)
public void init(org.apache.shardingsphere.infra.executor.kernel.model.ExecutionGroupContext<org.apache.shardingsphere.infra.executor.sql.execute.engine.driver.jdbc.JDBCExecutionUnit> executionGroupContext)
executionGroupContext - execution group contextpublic void addBatchForExecutionUnits(Collection<org.apache.shardingsphere.infra.executor.sql.context.ExecutionUnit> executionUnits)
executionUnits - execution unitspublic int[] executeBatch(org.apache.shardingsphere.infra.binder.statement.SQLStatementContext<?> sqlStatementContext)
throws SQLException
sqlStatementContext - SQL statement contextSQLException - SQL exceptionpublic List<List<Object>> getParameterSet(Statement statement)
statement - statementpublic void clear()
throws SQLException
SQLException - SQL exceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.