@Internal public interface JdbcBatchStatementExecutor<T>
Modifier and Type | Method and Description |
---|---|
void |
addToBatch(T record) |
void |
closeStatements()
Close JDBC related statements.
|
void |
executeBatch()
Submits a batch of commands to the database for execution.
|
static <T,K> JdbcBatchStatementExecutor<T> |
keyed(String sql,
java.util.function.Function<T,K> keyExtractor,
JdbcStatementBuilder<K> statementBuilder) |
void |
prepareStatements(Connection connection)
Create statements from connection.
|
static <T,V> JdbcBatchStatementExecutor<T> |
simple(String sql,
JdbcStatementBuilder<V> paramSetter,
java.util.function.Function<T,V> valueTransformer) |
void prepareStatements(Connection connection) throws SQLException
SQLException
void addToBatch(T record) throws SQLException
SQLException
void executeBatch() throws SQLException
SQLException
void closeStatements() throws SQLException
SQLException
static <T,K> JdbcBatchStatementExecutor<T> keyed(String sql, java.util.function.Function<T,K> keyExtractor, JdbcStatementBuilder<K> statementBuilder)
static <T,V> JdbcBatchStatementExecutor<T> simple(String sql, JdbcStatementBuilder<V> paramSetter, java.util.function.Function<T,V> valueTransformer)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.