public interface DB2Connection extends SqlConnection
Modifier and Type | Method and Description |
---|---|
static DB2Connection |
cast(SqlConnection sqlConnection)
Cast a
SqlConnection to DB2Connection . |
DB2Connection |
closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.
|
static Future<DB2Connection> |
connect(Vertx vertx,
DB2ConnectOptions connectOptions)
Like
connect(Vertx, DB2ConnectOptions, Handler) but returns a
Future of the asynchronous result |
static void |
connect(Vertx vertx,
DB2ConnectOptions connectOptions,
Handler<AsyncResult<DB2Connection>> handler)
Create a connection to DB2 server with the given
connectOptions . |
static Future<DB2Connection> |
connect(Vertx vertx,
String connectionUri)
Like
connect(Vertx, String, Handler) but returns a Future of
the asynchronous result |
static void |
connect(Vertx vertx,
String connectionUri,
Handler<AsyncResult<DB2Connection>> handler)
Like
connect(Vertx, DB2ConnectOptions, Handler) with options build
from connectionUri . |
Future<Void> |
debug()
Like
debug(Handler) but returns a Future of the asynchronous
result |
DB2Connection |
debug(Handler<AsyncResult<Void>> handler)
Send a DEBUG command to dump debug information to the server's stdout.
|
DB2Connection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
Future<Void> |
ping()
Like
ping(Handler) but returns a Future of the asynchronous
result |
DB2Connection |
ping(Handler<AsyncResult<Void>> handler)
Send a PING command to check if the server is alive.
|
DB2Connection |
prepare(String sql,
Handler<AsyncResult<PreparedStatement>> handler)
Create a prepared statement using the given
sql string. |
begin, begin, close, databaseMetadata, isSSL, prepare, prepare, prepare, transaction
close, preparedQuery, preparedQuery, query
static void connect(Vertx vertx, DB2ConnectOptions connectOptions, Handler<AsyncResult<DB2Connection>> handler)
connectOptions
.vertx
- the vertx instanceconnectOptions
- the options for the connectionhandler
- the handler called with the connection or the failurestatic Future<DB2Connection> connect(Vertx vertx, DB2ConnectOptions connectOptions)
connect(Vertx, DB2ConnectOptions, Handler)
but returns a
Future
of the asynchronous resultstatic void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<DB2Connection>> handler)
connect(Vertx, DB2ConnectOptions, Handler)
with options build
from connectionUri
.static Future<DB2Connection> connect(Vertx vertx, String connectionUri)
connect(Vertx, String, Handler)
but returns a Future
of
the asynchronous resultDB2Connection prepare(String sql, Handler<AsyncResult<PreparedStatement>> handler)
SqlConnection
sql
string.prepare
in interface SqlConnection
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslyDB2Connection exceptionHandler(Handler<Throwable> handler)
SqlConnection
exceptionHandler
in interface SqlConnection
handler
- the handlerDB2Connection closeHandler(Handler<Void> handler)
SqlConnection
closeHandler
in interface SqlConnection
handler
- the handlerDB2Connection ping(Handler<AsyncResult<Void>> handler)
handler
- the handler notified when the server responses to clientFuture<Void> ping()
ping(Handler)
but returns a Future
of the asynchronous
resultDB2Connection debug(Handler<AsyncResult<Void>> handler)
handler
- the handler notified with the execution resultFuture<Void> debug()
debug(Handler)
but returns a Future
of the asynchronous
resultstatic DB2Connection cast(SqlConnection sqlConnection)
SqlConnection
to DB2Connection
.
This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.sqlConnection
- the connection to castinstance
Copyright © 2023 Eclipse. All rights reserved.