public class SqlConnection extends SqlClient
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<SqlConnection> |
__TYPE_ARG |
Constructor and Description |
---|
SqlConnection(SqlConnection delegate) |
Modifier and Type | Method and Description |
---|---|
Transaction |
begin()
Begin a transaction and returns a
Transaction for controlling and tracking
this transaction. |
void |
close()
Close the current connection after all the pending commands have been processed.
|
SqlConnection |
closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.
|
boolean |
equals(Object o) |
SqlConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
SqlConnection |
getDelegate() |
int |
hashCode() |
boolean |
isSSL() |
static SqlConnection |
newInstance(SqlConnection arg) |
SqlConnection |
prepare(String sql,
Handler<AsyncResult<PreparedQuery>> handler)
Create a prepared query.
|
SqlConnection |
preparedBatch(String sql,
List<Tuple> batch,
Handler<AsyncResult<RowSet>> handler)
Prepare and execute a createBatch.
|
SqlConnection |
preparedQuery(String sql,
Handler<AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
SqlConnection |
preparedQuery(String sql,
Tuple arguments,
Handler<AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
SqlConnection |
query(String sql,
Handler<AsyncResult<RowSet>> handler)
Execute a simple query.
|
rx.Single<PreparedQuery> |
rxPrepare(String sql)
Create a prepared query.
|
rx.Single<RowSet> |
rxPreparedBatch(String sql,
List<Tuple> batch)
Prepare and execute a createBatch.
|
rx.Single<RowSet> |
rxPreparedQuery(String sql)
Prepare and execute a query.
|
rx.Single<RowSet> |
rxPreparedQuery(String sql,
Tuple arguments)
Prepare and execute a query.
|
rx.Single<RowSet> |
rxQuery(String sql)
Execute a simple query.
|
String |
toString() |
newInstance
public static final TypeArg<SqlConnection> __TYPE_ARG
public SqlConnection(SqlConnection delegate)
public SqlConnection getDelegate()
getDelegate
in class SqlClient
public SqlConnection prepare(String sql, Handler<AsyncResult<PreparedQuery>> handler)
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslypublic rx.Single<PreparedQuery> rxPrepare(String sql)
sql
- the sqlpublic SqlConnection exceptionHandler(Handler<Throwable> handler)
handler
- the handlerpublic SqlConnection closeHandler(Handler<Void> handler)
handler
- the handlerpublic Transaction begin()
Transaction
for controlling and tracking
this transaction.
When the connection is explicitely closed, any inflight transaction is rollbacked.public boolean isSSL()
public void close()
public SqlConnection preparedQuery(String sql, Handler<AsyncResult<RowSet>> handler)
SqlClient
preparedQuery
in class SqlClient
sql
- the prepared query SQLhandler
- the handler notified with the execution resultpublic rx.Single<RowSet> rxPreparedQuery(String sql)
SqlClient
rxPreparedQuery
in class SqlClient
sql
- the prepared query SQLpublic SqlConnection query(String sql, Handler<AsyncResult<RowSet>> handler)
SqlClient
public rx.Single<RowSet> rxQuery(String sql)
SqlClient
public SqlConnection preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet>> 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> rxPreparedQuery(String sql, Tuple arguments)
SqlClient
rxPreparedQuery
in class SqlClient
sql
- the prepared query SQLarguments
- the list of argumentspublic SqlConnection preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet>> 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> rxPreparedBatch(String sql, List<Tuple> batch)
SqlClient
rxPreparedBatch
in class SqlClient
sql
- the prepared query SQLbatch
- the batch of tuplespublic static SqlConnection newInstance(SqlConnection arg)
Copyright © 2019 Eclipse. All rights reserved.