public final class BatchBuilder extends Object
Statement.executeBatch() method.| Constructor and Description |
|---|
BatchBuilder() |
| Modifier and Type | Method and Description |
|---|---|
BatchBuilder |
add(@NonNull AbstractQuery query)
Adds a query to the batch.
|
int[] |
execute(@NonNull Connection con)
Executes all added queries as a batch.
|
int[] |
execute(@NonNull DataSource source)
Obtains a connection from the source, executes all added queries as a batch and closes the connection.
|
public BatchBuilder add(@NonNull @NonNull AbstractQuery query)
query - Query to be added.public int[] execute(@NonNull
@NonNull Connection con)
throws SQLException
con - Connection.SQLException - On SQL error.public int[] execute(@NonNull
@NonNull DataSource source)
throws SQLException
source - Data source.SQLException - On SQL error.Copyright © 2021. All rights reserved.