Modifier and Type | Field and Description |
---|---|
static TypeArg<Transaction> |
__TYPE_ARG |
Constructor and Description |
---|
Transaction(Transaction delegate) |
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 |
boolean |
equals(Object o) |
Transaction |
getDelegate() |
int |
hashCode() |
static Transaction |
newInstance(Transaction arg) |
Transaction |
prepare(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedQuery>> handler)
Create a prepared query.
|
Transaction |
preparedBatch(String sql,
List<Tuple> batch,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a createBatch.
|
Transaction |
preparedQuery(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
Transaction |
preparedQuery(String sql,
Tuple arguments,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
Prepare and execute a query.
|
Transaction |
query(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> 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 |
rx.Single<Void> |
rxCommit()
Like
commit() with an handler to be notified when the transaction commit has completed |
rx.Single<PreparedQuery> |
rxPrepare(String sql)
Create a prepared query.
|
rx.Single<RowSet<Row>> |
rxPreparedBatch(String sql,
List<Tuple> batch)
Prepare and execute a createBatch.
|
rx.Single<RowSet<Row>> |
rxPreparedQuery(String sql)
Prepare and execute a query.
|
rx.Single<RowSet<Row>> |
rxPreparedQuery(String sql,
Tuple arguments)
Prepare and execute a query.
|
rx.Single<RowSet<Row>> |
rxQuery(String sql)
Execute a simple query.
|
rx.Single<Void> |
rxRollback()
Like
rollback() with an handler to be notified when the transaction rollback has completed |
String |
toString() |
newInstance
public static final TypeArg<Transaction> __TYPE_ARG
public Transaction(Transaction delegate)
public Transaction getDelegate()
getDelegate
in class SqlClient
public Transaction prepare(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedQuery>> handler)
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslypublic rx.Single<PreparedQuery> rxPrepare(String sql)
sql
- the sqlpublic void commit()
public void commit(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
commit()
with an handler to be notified when the transaction commit has completedhandler
- public rx.Single<Void> rxCommit()
commit()
with an handler to be notified when the transaction commit has completedpublic void rollback()
public void rollback(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
rollback()
with an handler to be notified when the transaction rollback has completedhandler
- public rx.Single<Void> rxRollback()
rollback()
with an handler to be notified when the transaction rollback has completedpublic Transaction abortHandler(io.vertx.core.Handler<Void> handler)
handler
- the handlerpublic Transaction query(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
public rx.Single<RowSet<Row>> rxQuery(String sql)
SqlClient
public Transaction preparedQuery(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
preparedQuery
in class SqlClient
sql
- the prepared query SQLhandler
- the handler notified with the execution resultpublic rx.Single<RowSet<Row>> rxPreparedQuery(String sql)
SqlClient
rxPreparedQuery
in class SqlClient
sql
- the prepared query SQLpublic Transaction preparedQuery(String sql, Tuple arguments, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
preparedQuery
in class SqlClient
sql
- the prepared query SQLarguments
- the list of argumentshandler
- the handler notified with the execution resultpublic rx.Single<RowSet<Row>> rxPreparedQuery(String sql, Tuple arguments)
SqlClient
rxPreparedQuery
in class SqlClient
sql
- the prepared query SQLarguments
- the list of argumentspublic Transaction preparedBatch(String sql, List<Tuple> batch, io.vertx.core.Handler<io.vertx.core.AsyncResult<RowSet<Row>>> handler)
SqlClient
preparedBatch
in class SqlClient
sql
- the prepared query SQLbatch
- the batch of tupleshandler
- the handler notified with the execution resultpublic rx.Single<RowSet<Row>> rxPreparedBatch(String sql, List<Tuple> batch)
SqlClient
rxPreparedBatch
in class SqlClient
sql
- the prepared query SQLbatch
- the batch of tuplespublic void close()
public static Transaction newInstance(Transaction arg)
Copyright © 2019 Eclipse. All rights reserved.