Modifier and Type | Method and Description |
---|---|
Transaction |
abortHandler(io.vertx.core.Handler<Void> handler)
Set an handler to be called when the transaction is aborted.
|
void |
close()
Rollback the transaction and release the associated resources.
|
void |
commit()
Commit the current transaction.
|
void |
commit(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Like
commit() with an handler to be notified when the transaction commit has completed |
Transaction |
prepare(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedQuery>> handler)
Create a prepared query.
|
<R> Transaction |
preparedBatch(String sql,
List<Tuple> batch,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a createBatch.
|
Transaction |
preparedBatch(String sql,
List<Tuple> batch,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Prepare and execute a createBatch.
|
<R> Transaction |
preparedQuery(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
Transaction |
preparedQuery(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
<R> Transaction |
preparedQuery(String sql,
Tuple arguments,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Prepare and execute a query.
|
Transaction |
preparedQuery(String sql,
Tuple arguments,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
<R> Transaction |
query(String sql,
Collector<Row,?,R> collector,
io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
Execute a simple query.
|
Transaction |
query(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
Execute a simple query.
|
void |
rollback()
Rollback the current transaction.
|
void |
rollback(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Like
rollback() with an handler to be notified when the transaction rollback has completed |
Transaction prepare(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedQuery>> handler)
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslyvoid commit()
void commit(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
commit()
with an handler to be notified when the transaction commit has completedvoid rollback()
void rollback(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
rollback()
with an handler to be notified when the transaction rollback has completedTransaction abortHandler(io.vertx.core.Handler<Void> handler)
handler
- the handlerTransaction query(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
<R> Transaction query(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
Transaction preparedQuery(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLhandler
- the handler notified with the execution result<R> Transaction preparedQuery(String sql, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLcollector
- the collectorhandler
- the handler notified with the execution resultTransaction preparedQuery(String sql, Tuple arguments, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLarguments
- the list of argumentshandler
- the handler notified with the execution result<R> Transaction preparedQuery(String sql, Tuple arguments, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedQuery
in interface SqlClient
sql
- the prepared query SQLarguments
- the list of argumentscollector
- the collectorhandler
- the handler notified with the execution resultTransaction preparedBatch(String sql, List<Tuple> batch, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet>> handler)
SqlClient
preparedBatch
in interface SqlClient
sql
- the prepared query SQLbatch
- the batch of tupleshandler
- the handler notified with the execution result<R> Transaction preparedBatch(String sql, List<Tuple> batch, Collector<Row,?,R> collector, io.vertx.core.Handler<io.vertx.core.AsyncResult<SqlResult<R>>> handler)
SqlClient
preparedBatch
in interface SqlClient
sql
- the prepared query SQLbatch
- the batch of tuplescollector
- the collectorhandler
- the handler notified with the execution resultCopyright © 2019 Eclipse. All rights reserved.