public interface BatchBuilder
It will be executed all at once, using a single database connection.
| Modifier and Type | Method and Description |
|---|---|
BatchBuilder |
batch(be.bendem.sqlstreams.util.SqlConsumer<PreparedStatement> handler)
Adds an additional handler to be executed when this batch is finished.
|
void |
execute()
Executes the statement for this batch, with the handlers used to prepare it.
|
me.lucko.helper.promise.Promise<Void> |
executeAsync()
Executes the statement for this batch, with the handlers used to prepare it.
|
Collection<be.bendem.sqlstreams.util.SqlConsumer<PreparedStatement>> |
getHandlers()
Gets a
Collection of handlers for this statement. |
String |
getStatement()
Gets the statement to be executed when this batch is finished.
|
BatchBuilder |
reset()
Resets this BatchBuilder, making it possible to re-use
for multiple situations.
|
@Nonnull String getStatement()
@Nonnull Collection<be.bendem.sqlstreams.util.SqlConsumer<PreparedStatement>> getHandlers()
Collection of handlers for this statement.BatchBuilder reset()
BatchBuilder batch(@Nonnull be.bendem.sqlstreams.util.SqlConsumer<PreparedStatement> handler)
handler - the statement handlervoid execute()
Copyright © 2019. All rights reserved.