public interface SqlConnection extends SqlClient
Modifier and Type | Method and Description |
---|---|
Future<Transaction> |
begin()
Like
begin(Handler) but returns a Future of the asynchronous result |
void |
begin(Handler<AsyncResult<Transaction>> handler)
Begin a transaction and returns a
Transaction for controlling and tracking
this transaction. |
void |
close(Handler<AsyncResult<Void>> handler)
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.
|
DatabaseMetadata |
databaseMetadata() |
SqlConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
boolean |
isSSL() |
Future<PreparedStatement> |
prepare(String sql)
Like
prepare(String, Handler) but returns a Future of the asynchronous result |
SqlConnection |
prepare(String sql,
Handler<AsyncResult<PreparedStatement>> handler)
Create a prepared statement using the given
sql string. |
Future<PreparedStatement> |
prepare(String sql,
PrepareOptions options)
Like
prepare(String, Handler) but returns a Future of the asynchronous result |
SqlConnection |
prepare(String sql,
PrepareOptions options,
Handler<AsyncResult<PreparedStatement>> handler)
Create a prepared statement using the given
sql string. |
Transaction |
transaction() |
close, preparedQuery, preparedQuery, query
SqlConnection prepare(String sql, Handler<AsyncResult<PreparedStatement>> handler)
sql
string.sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslyFuture<PreparedStatement> prepare(String sql)
prepare(String, Handler)
but returns a Future
of the asynchronous resultSqlConnection prepare(String sql, PrepareOptions options, Handler<AsyncResult<PreparedStatement>> handler)
sql
string.sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslyFuture<PreparedStatement> prepare(String sql, PrepareOptions options)
prepare(String, Handler)
but returns a Future
of the asynchronous resultSqlConnection exceptionHandler(Handler<Throwable> handler)
handler
- the handlerSqlConnection closeHandler(Handler<Void> handler)
handler
- the handlervoid begin(Handler<AsyncResult<Transaction>> handler)
Transaction
for controlling and tracking
this transaction.
When the connection is explicitely closed, any inflight transaction is rollbacked.Future<Transaction> begin()
begin(Handler)
but returns a Future
of the asynchronous resultTransaction transaction()
boolean isSSL()
void close(Handler<AsyncResult<Void>> handler)
DatabaseMetadata databaseMetadata()
Copyright © 2023 Eclipse. All rights reserved.