java.lang.Object
org.itsallcode.jdbc.batch.StatementBatchBuilder
A builder for
StatementBatch.-
Constructor Summary
ConstructorsConstructorDescriptionStatementBatchBuilder(Supplier<SimpleStatement> statementFactory) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the batch inserter.maxBatchSize(int maxBatchSize) Define maximum batch size, usingPreparedStatementBatchBuilder.DEFAULT_MAX_BATCH_SIZEas default.
-
Constructor Details
-
StatementBatchBuilder
Create a new instance.- Parameters:
statementFactory- factory for creatingSimpleStatement.
-
-
Method Details
-
maxBatchSize
Define maximum batch size, usingPreparedStatementBatchBuilder.DEFAULT_MAX_BATCH_SIZEas default.- Parameters:
maxBatchSize- maximum batch size- Returns:
thisfor fluent programming
-
build
Build the batch inserter.- Returns:
- the statement batch
-