Class DB2Connection
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- See Also:
-
DB2Connection
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDB2Connection(io.vertx.db2client.DB2Connection delegate) Create a new instance ofDB2Connectiondelegating to the given (non-null) instance ofDB2Connection.DB2Connection(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Transaction>begin()Begin a transaction and returns aTransactionfor controlling and tracking this transaction.Begin a transaction and returns aTransactionfor controlling and tracking this transaction.Begin a transaction and returns aTransactionfor controlling and tracking this transaction.static DB2Connectioncast(SqlConnection sqlConnection) Cast aSqlConnectiontoDB2Connection.io.smallrye.mutiny.Uni<Void>close()Close the client and release the associated resources.voidClose the client and release the associated resources.Close the client and release the associated resources.closeHandler(Runnable handler) Set an handler called when the connection is closed.static io.smallrye.mutiny.Uni<DB2Connection>Create a connection to DB2 server with the givenconnectOptions.static io.smallrye.mutiny.Uni<DB2Connection>Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri.static DB2ConnectionconnectAndAwait(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions) Create a connection to DB2 server with the givenconnectOptions.static DB2ConnectionconnectAndAwait(Vertx vertx, String connectionUri) Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri.static voidconnectAndForget(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions) Create a connection to DB2 server with the givenconnectOptions.static voidconnectAndForget(Vertx vertx, String connectionUri) Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri.io.smallrye.mutiny.Uni<Void>debug()Send a DEBUG command to dump debug information to the server's stdout.voidSend a DEBUG command to dump debug information to the server's stdout.Send a DEBUG command to dump debug information to the server's stdout.booleanexceptionHandler(Consumer<Throwable> handler) Set an handler called with connection errors.io.vertx.db2client.DB2ConnectionGet the delegate instance.inthashCode()static DB2ConnectionnewInstance(io.vertx.db2client.DB2Connection delegate) Creates a new instance of theDB2Connection.io.smallrye.mutiny.Uni<Void>ping()Send a PING command to check if the server is alive.voidSend a PING command to check if the server is alive.Send a PING command to check if the server is alive.io.smallrye.mutiny.Uni<PreparedStatement>Create a prepared statement using the givensqlstring.io.smallrye.mutiny.Uni<PreparedStatement>Create a prepared statement using the givensqlstring.prepareAndAwait(String sql) Create a prepared statement using the givensqlstring.prepareAndAwait(String sql, io.vertx.sqlclient.PrepareOptions options) Create a prepared statement using the givensqlstring.prepareAndForget(String sql) Create a prepared statement using the givensqlstring.prepareAndForget(String sql, io.vertx.sqlclient.PrepareOptions options) Create a prepared statement using the givensqlstring.toString()Methods inherited from class io.vertx.mutiny.sqlclient.SqlConnection
databaseMetadata, isSSL, newInstance, transactionMethods inherited from class io.vertx.mutiny.sqlclient.SqlClient
newInstance, preparedQuery, preparedQuery, query
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
DB2Connection
public DB2Connection(io.vertx.db2client.DB2Connection delegate) Create a new instance ofDB2Connectiondelegating to the given (non-null) instance ofDB2Connection. -
DB2Connection
-
-
Method Details
-
getDelegate
public io.vertx.db2client.DB2Connection getDelegate()Get the delegate instance.This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.
- Specified by:
getDelegatein interfaceMutinyDelegate- Overrides:
getDelegatein classSqlConnection- Returns:
- the delegate instance
-
connect
@CheckReturnValue public static io.smallrye.mutiny.Uni<DB2Connection> connect(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions) Create a connection to DB2 server with the givenconnectOptions.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.db2client.DB2Connection#connect(Vertx, DB2ConnectOptions)
-
connectAndAwait
public static DB2Connection connectAndAwait(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions) Create a connection to DB2 server with the givenconnectOptions.Unlike the bare Vert.x variant, this method returns a
DB2Connection. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connection- Returns:
- The operation result
- See Also:
-
io.vertx.db2client.DB2Connection#connect(Vertx, DB2ConnectOptions)
-
connectAndForget
public static void connectAndForget(Vertx vertx, io.vertx.db2client.DB2ConnectOptions connectOptions) Create a connection to DB2 server with the givenconnectOptions.Unlike the bare Vert.x variant, this method ignores the
DB2Connectionresult or any failure.- Parameters:
vertx- the vertx instanceconnectOptions- the options for the connection- See Also:
-
io.vertx.db2client.DB2Connection#connect(Vertx, DB2ConnectOptions)
-
connect
@CheckReturnValue public static io.smallrye.mutiny.Uni<DB2Connection> connect(Vertx vertx, String connectionUri) Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
io.vertx.db2client.DB2Connection#connect(Vertx, String)
-
connectAndAwait
Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri.Unlike the bare Vert.x variant, this method returns a
DB2Connection. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Returns:
- The operation result
- See Also:
-
io.vertx.db2client.DB2Connection#connect(Vertx, String)
-
connectAndForget
Likeconnect(Vertx, DB2ConnectOptions)with options build fromconnectionUri.Unlike the bare Vert.x variant, this method ignores the
DB2Connectionresult or any failure.- See Also:
-
io.vertx.db2client.DB2Connection#connect(Vertx, String)
-
ping
Send a PING command to check if the server is alive.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
DB2Connection.ping()
-
pingAndAwait
public void pingAndAwait()Send a PING command to check if the server is alive.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- See Also:
-
DB2Connection.ping()
-
pingAndForget
Send a PING command to check if the server is alive.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
DB2Connection.ping()
-
debug
Send a DEBUG command to dump debug information to the server's stdout.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
DB2Connection.debug()
-
debugAndAwait
public void debugAndAwait()Send a DEBUG command to dump debug information to the server's stdout.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- See Also:
-
DB2Connection.debug()
-
debugAndForget
Send a DEBUG command to dump debug information to the server's stdout.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
DB2Connection.debug()
-
prepare
@CheckReturnValue public io.smallrye.mutiny.Uni<PreparedStatement> prepare(String sql, io.vertx.sqlclient.PrepareOptions options) Create a prepared statement using the givensqlstring.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
preparein classSqlConnection- Parameters:
sql- the sql- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SqlConnection.prepare(String, PrepareOptions)
-
prepareAndAwait
Create a prepared statement using the givensqlstring.Unlike the bare Vert.x variant, this method returns a
PreparedStatement. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
prepareAndAwaitin classSqlConnection- Parameters:
sql- the sql- Returns:
- The operation result
- See Also:
-
SqlConnection.prepare(String, PrepareOptions)
-
prepareAndForget
Create a prepared statement using the givensqlstring.Unlike the bare Vert.x variant, this method ignores the
PreparedStatementresult or any failure.- Overrides:
prepareAndForgetin classSqlConnection- Parameters:
sql- the sql- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SqlConnection.prepare(String, PrepareOptions)
-
prepare
Create a prepared statement using the givensqlstring.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
preparein classSqlConnection- Parameters:
sql- the sql- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SqlConnection.prepare(String)
-
prepareAndAwait
Create a prepared statement using the givensqlstring.Unlike the bare Vert.x variant, this method returns a
PreparedStatement. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
prepareAndAwaitin classSqlConnection- Parameters:
sql- the sql- Returns:
- The operation result
- See Also:
-
SqlConnection.prepare(String)
-
prepareAndForget
Create a prepared statement using the givensqlstring.Unlike the bare Vert.x variant, this method ignores the
PreparedStatementresult or any failure.- Overrides:
prepareAndForgetin classSqlConnection- Parameters:
sql- the sql- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SqlConnection.prepare(String)
-
begin
Begin a transaction and returns aTransactionfor controlling and tracking this transaction. When the connection is explicitely closed, any inflight transaction is rollbacked.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
beginin classSqlConnection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SqlConnection.begin()
-
beginAndAwait
Begin a transaction and returns aTransactionfor controlling and tracking this transaction. When the connection is explicitely closed, any inflight transaction is rollbacked.Unlike the bare Vert.x variant, this method returns a
Transaction. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
beginAndAwaitin classSqlConnection- Returns:
- The operation result
- See Also:
-
SqlConnection.begin()
-
beginAndForget
Begin a transaction and returns aTransactionfor controlling and tracking this transaction. When the connection is explicitely closed, any inflight transaction is rollbacked.Unlike the bare Vert.x variant, this method ignores the
Transactionresult or any failure.- Overrides:
beginAndForgetin classSqlConnection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SqlConnection.begin()
-
close
Close the client and release the associated resources.Unlike the bare Vert.x variant, this method returns a
Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.Don't forget to subscribe on it to trigger the operation.
- Overrides:
closein classSqlConnection- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
SqlClient.close()
-
closeAndAwait
public void closeAndAwait()Close the client and release the associated resources.Unlike the bare Vert.x variant, this method returns a
Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in aRuntimeException).- Overrides:
closeAndAwaitin classSqlConnection- See Also:
-
SqlClient.close()
-
closeAndForget
Close the client and release the associated resources.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Overrides:
closeAndForgetin classSqlConnection- Returns:
- The current instance to chain operations if needed.
- See Also:
-
SqlClient.close()
-
exceptionHandler
Description copied from class:SqlConnectionSet an handler called with connection errors.- Overrides:
exceptionHandlerin classSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
Description copied from class:SqlConnectionSet an handler called when the connection is closed.- Overrides:
closeHandlerin classSqlConnection- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
cast
Cast aSqlConnectiontoDB2Connection. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.- Parameters:
sqlConnection- the connection to cast- Returns:
- a
instance
-
newInstance
Creates a new instance of theDB2Connection. -
hashCode
public int hashCode()- Overrides:
hashCodein classSqlConnection
-
equals
- Overrides:
equalsin classSqlConnection
-
toString
- Overrides:
toStringin classSqlConnection
-