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_SIZE
as default.
-
Constructor Details
-
StatementBatchBuilder
Create a new instance.- Parameters:
statementFactory
- factory for creatingSimpleStatement
.
-
-
Method Details
-
maxBatchSize
Define maximum batch size, usingPreparedStatementBatchBuilder.DEFAULT_MAX_BATCH_SIZE
as default.- Parameters:
maxBatchSize
- maximum batch size- Returns:
this
for fluent programming
-
build
Build the batch inserter.- Returns:
- the statement batch
-