Interface DB2Connection
- All Superinterfaces:
SqlClient, SqlConnection
A connection to DB2 server.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DB2Connectioncast(SqlConnection sqlConnection) Cast aSqlConnectiontoDB2Connection.closeHandler(Handler<Void> handler) Set an handler called when the connection is closed.static Future<DB2Connection> connect(Vertx vertx, DB2ConnectOptions connectOptions) Create a connection to DB2 server with the givenconnectOptions.static Future<DB2Connection> Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri.debug()Send a DEBUG command to dump debug information to the server's stdout.exceptionHandler(Handler<Throwable> handler) Set an handler called with connection errors.ping()Send a PING command to check if the server is alive.Methods inherited from interface SqlClient
close, preparedQuery, preparedQuery, queryMethods inherited from interface SqlConnection
begin, databaseMetadata, isSSL, prepare, prepare, transaction
-
Method Details
-
connect
Create a connection to DB2 server with the givenconnectOptions.- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connection- Returns:
- a future notified with the connection or the failure
-
connect
Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri. -
exceptionHandler
Description copied from interface:SqlConnectionSet an handler called with connection errors.- Specified by:
exceptionHandlerin interfaceSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
Description copied from interface:SqlConnectionSet an handler called when the connection is closed.- Specified by:
closeHandlerin interfaceSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
ping
-
debug
-
cast
Cast aSqlConnectiontoDB2Connection. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.- Parameters:
sqlConnection- the connection to cast- Returns:
- a
instance
-