Interface SingleStatementBatch
- All Superinterfaces:
Batch
Batch variant for a single JDBC statement shape.
A single-statement batch owns one prepared mutation statement and accepts
rows by binding directly to that statement. It is designed for execution
paths, such as graph-based flushing, that have already planned work by
statement shape and therefore do not need the GroupedBatch statement-group
abstraction.
Implementations may execute implicitly when adding a row fills the configured
batch size. Callers that need per-row follow-up work should therefore assume
that addToBatch(StatementBinder, BatchedResultChecker) can execute the
JDBC batch before returning.
- Since:
- 8.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddToBatch(StatementBinder statementBinder, BatchedResultChecker resultChecker) Bind and add one row to this batch.Methods inherited from interface Batch
addObserver, execute, getKey, release
-
Method Details
-
addToBatch
Bind and add one row to this batch.
The supplied binder is called with the batch-owned
PreparedStatementand must bind exactly the values for the current row before returning. The batch then callsPreparedStatement.addBatch().resultCheckeris associated with the row being added. It may benullwhen default expectation handling is sufficient.- Parameters:
statementBinder- binds the current row to the batch statementresultChecker- optional row result checker used for stale-state/result handling associated with this row
-