-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
BatchBindStep
public interface Batch extends Serializable
A wrapper for a JDBC batch operation. It has two modes:- Execute several queries without bind values
create.batch(query1, query2, query3) .execute();
- Execute one query several times with bind values
create.batch(query) .bind(valueA1, valueA2) .bind(valueB1, valueB2) .execute();
- Author:
- Lukas Eder
- See Also:
Statement.executeBatch()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @org.jetbrains.annotations.NotNull int[]
execute()
Execute the batch operation.@NotNull CompletionStage<int[]>
executeAsync()
Execute the batch operation in a newCompletionStage
.@NotNull CompletionStage<int[]>
executeAsync(Executor executor)
Execute the query in a newCompletionStage
that is asynchronously completed by a task running in the given executor.int
size()
Get the number of executed queries in this batch operation
-
-
-
Method Detail
-
execute
@NotNull @org.jetbrains.annotations.NotNull int[] execute() throws DataAccessException
Execute the batch operation.- Throws:
DataAccessException
- if something went wrong executing the query- See Also:
Statement.executeBatch()
-
executeAsync
@NotNull @NotNull CompletionStage<int[]> executeAsync()
Execute the batch operation in a newCompletionStage
.The result is asynchronously completed by a task running in an
Executor
provided by the underlyingConfiguration.executorProvider()
.- See Also:
Statement.executeBatch()
-
executeAsync
@NotNull @NotNull CompletionStage<int[]> executeAsync(Executor executor)
Execute the query in a newCompletionStage
that is asynchronously completed by a task running in the given executor.
-
size
int size()
Get the number of executed queries in this batch operation
-
-