Class SqlConnection
- All Implemented Interfaces:
 MutinyDelegate
- Direct Known Subclasses:
 DB2Connection,MSSQLConnection,MySQLConnection,OracleConnection,PgConnection
original non Mutiny-ified interface using Vert.x codegen.- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionSqlConnection(io.vertx.sqlclient.SqlConnection delegate) SqlConnection(Object delegate)  - 
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Transaction>begin()Begin a transaction and returns aTransactionfor controlling and tracking this transaction.Blocking variant ofbegin().voidVariant ofbegin()that ignores the result of the operation.io.smallrye.mutiny.Uni<Void>close()Close the current connection after all the pending commands have been processed.Blocking variant ofSqlClient.close().voidVariant ofSqlClient.close()that ignores the result of the operation.closeHandler(Runnable handler) booleanexceptionHandler(Consumer<Throwable> handler) io.vertx.sqlclient.SqlConnectioninthashCode()booleanisSSL()static SqlConnectionnewInstance(io.vertx.sqlclient.SqlConnection arg) 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) Blocking variant ofprepare(String).prepareAndAwait(String sql, io.vertx.sqlclient.PrepareOptions options) Blocking variant ofprepare(String,PrepareOptions).prepareAndForget(String sql) Variant ofprepare(String)that ignores the result of the operation.prepareAndForget(String sql, io.vertx.sqlclient.PrepareOptions options) Variant ofprepare(String,PrepareOptions)that ignores the result of the operation.toString()Methods inherited from class io.vertx.mutiny.sqlclient.SqlClient
newInstance, preparedQuery, preparedQuery, query 
- 
Field Details
- 
__TYPE_ARG
 
 - 
 - 
Constructor Details
- 
SqlConnection
public SqlConnection(io.vertx.sqlclient.SqlConnection delegate)  - 
SqlConnection
 
 - 
 - 
Method Details
- 
getDelegate
public io.vertx.sqlclient.SqlConnection getDelegate()- Specified by:
 getDelegatein interfaceMutinyDelegate- Overrides:
 getDelegatein classSqlClient- Returns:
 - the delegate used by this Mutiny object of generated type
 
 - 
toString
 - 
equals
 - 
hashCode
public int hashCode() - 
prepare
Create a prepared statement using the givensqlstring.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Parameters:
 sql- the sql- Returns:
 - the 
unifiring the result of the operation when completed, or a failure if the operation failed. 
 - 
prepareAndAwait
Blocking variant ofprepare(String).This method waits 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 a RuntimeException).
- Parameters:
 sql- the sql- Returns:
 - the PreparedStatement instance produced by the operation.
 
 - 
prepareAndForget
Variant ofprepare(String)that ignores the result of the operation.This method subscribes on the result of
prepare(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromprepare(String)but you don't need to compose it with other operations.- Parameters:
 sql- the sql- Returns:
 - the instance of SqlConnection to chain method calls.
 
 - 
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. Don't forget to subscribe on it to trigger the operation.- Parameters:
 sql- the sqloptions-- Returns:
 - the 
unifiring the result of the operation when completed, or a failure if the operation failed. 
 - 
prepareAndAwait
Blocking variant ofprepare(String,PrepareOptions).This method waits 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 a RuntimeException).
- Parameters:
 sql- the sqloptions-- Returns:
 - the PreparedStatement instance produced by the operation.
 
 - 
prepareAndForget
Variant ofprepare(String,PrepareOptions)that ignores the result of the operation.This method subscribes on the result of
prepare(String,PrepareOptions), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromprepare(String,PrepareOptions)but you don't need to compose it with other operations.- Parameters:
 sql- the sqloptions-- Returns:
 - the instance of SqlConnection to chain method calls.
 
 - 
exceptionHandler
- Parameters:
 handler- the handler- Returns:
 
 - 
closeHandler
- Parameters:
 handler- the handler- Returns:
 
 - 
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. Don't forget to subscribe on it to trigger the operation.- Returns:
 - the 
unifiring the result of the operation when completed, or a failure if the operation failed. 
 - 
beginAndAwait
Blocking variant ofbegin().This method waits 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 a RuntimeException).
- Returns:
 - the Transaction instance produced by the operation.
 
 - 
beginAndForget
public void beginAndForget() - 
transaction
- Returns:
 - the current transaction if it exists, otherwise null
 
 - 
isSSL
public boolean isSSL()- Returns:
 - whether the connection uses SSL
 
 - 
close
Close the current connection after all the pending commands have been processed.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation. - 
closeAndAwait
Blocking variant ofSqlClient.close().This method waits 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 a RuntimeException).
- Overrides:
 closeAndAwaitin classSqlClient- Returns:
 - the Void instance produced by the operation.
 
 - 
closeAndForget
public void closeAndForget()Variant ofSqlClient.close()that ignores the result of the operation.This method subscribes on the result of
SqlClient.close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromSqlClient.close()but you don't need to compose it with other operations.- Overrides:
 closeAndForgetin classSqlClient
 - 
databaseMetadata
- Returns:
 - The static metadata about the backend database server for this connection
 
 - 
newInstance
 
 -