public interface SqlConnection extends SqlClient
Modifier and Type | Method and Description |
---|---|
io.vertx.core.Future<Transaction> |
begin()
Like
begin(Handler) but returns a Future of the asynchronous result |
void |
begin(io.vertx.core.Handler<io.vertx.core.AsyncResult<Transaction>> handler)
Begin a transaction and returns a
Transaction for controlling and tracking
this transaction. |
void |
close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Close the current connection after all the pending commands have been processed.
|
SqlConnection |
closeHandler(io.vertx.core.Handler<Void> handler)
Set an handler called when the connection is closed.
|
DatabaseMetadata |
databaseMetadata() |
SqlConnection |
exceptionHandler(io.vertx.core.Handler<Throwable> handler)
Set an handler called with connection errors.
|
boolean |
isSSL() |
io.vertx.core.Future<PreparedStatement> |
prepare(String sql)
Like
prepare(String, Handler) but returns a Future of the asynchronous result |
SqlConnection |
prepare(String sql,
io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedStatement>> handler)
Create a prepared statement using the given
sql string. |
close, preparedQuery, query
SqlConnection prepare(String sql, io.vertx.core.Handler<io.vertx.core.AsyncResult<PreparedStatement>> handler)
sql
string.sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslyio.vertx.core.Future<PreparedStatement> prepare(String sql)
prepare(String, Handler)
but returns a Future
of the asynchronous resultSqlConnection exceptionHandler(io.vertx.core.Handler<Throwable> handler)
handler
- the handlerSqlConnection closeHandler(io.vertx.core.Handler<Void> handler)
handler
- the handlervoid begin(io.vertx.core.Handler<io.vertx.core.AsyncResult<Transaction>> handler)
Transaction
for controlling and tracking
this transaction.
When the connection is explicitely closed, any inflight transaction is rollbacked.io.vertx.core.Future<Transaction> begin()
begin(Handler)
but returns a Future
of the asynchronous resultboolean isSSL()
void close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
DatabaseMetadata databaseMetadata()
Copyright © 2020 Eclipse. All rights reserved.