Package io.vertx.rxjava3.sqlclient
Class SqlConnection
- java.lang.Object
 - 
- io.vertx.rxjava3.sqlclient.SqlClient
 - 
- io.vertx.rxjava3.sqlclient.SqlConnection
 
 
 
- 
- Direct Known Subclasses:
 DB2Connection,MSSQLConnection,MySQLConnection,OracleConnection,PgConnection
public class SqlConnection extends SqlClient
A connection to the database server. NOTE: This class has been automatically generated from theoriginalnon RX-ified interface using Vert.x codegen. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static TypeArg<SqlConnection>__TYPE_ARG 
- 
Constructor Summary
Constructors Constructor Description SqlConnection(SqlConnection delegate)SqlConnection(Object delegate) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Single<Transaction>begin()Begin a transaction and returns aTransactionfor controlling and tracking this transaction.io.reactivex.rxjava3.core.Completableclose()Close the current connection after all the pending commands have been processed.SqlConnectioncloseHandler(Handler<Void> handler)Set an handler called when the connection is closed.DatabaseMetadatadatabaseMetadata()booleanequals(Object o)SqlConnectionexceptionHandler(Handler<Throwable> handler)Set an handler called with connection errors.SqlConnectiongetDelegate()inthashCode()booleanisSSL()static SqlConnectionnewInstance(SqlConnection arg)io.reactivex.rxjava3.core.Single<PreparedStatement>prepare(String sql)Create a prepared statement using the givensqlstring.io.reactivex.rxjava3.core.Single<PreparedStatement>prepare(String sql, PrepareOptions options)Create a prepared statement using the givensqlstring.io.reactivex.rxjava3.core.Single<Transaction>rxBegin()Begin a transaction and returns aTransactionfor controlling and tracking this transaction.io.reactivex.rxjava3.core.CompletablerxClose()Close the current connection after all the pending commands have been processed.io.reactivex.rxjava3.core.Single<PreparedStatement>rxPrepare(String sql)Create a prepared statement using the givensqlstring.io.reactivex.rxjava3.core.Single<PreparedStatement>rxPrepare(String sql, PrepareOptions options)Create a prepared statement using the givensqlstring.StringtoString()Transactiontransaction()- 
Methods inherited from class io.vertx.rxjava3.sqlclient.SqlClient
newInstance, preparedQuery, preparedQuery, query 
 - 
 
 - 
 
- 
- 
Field Detail
- 
__TYPE_ARG
public static final TypeArg<SqlConnection> __TYPE_ARG
 
 - 
 
- 
Constructor Detail
- 
SqlConnection
public SqlConnection(SqlConnection delegate)
 
- 
SqlConnection
public SqlConnection(Object delegate)
 
 - 
 
- 
Method Detail
- 
getDelegate
public SqlConnection getDelegate()
- Overrides:
 getDelegatein classSqlClient
 
- 
prepare
public io.reactivex.rxjava3.core.Single<PreparedStatement> prepare(String sql)
Create a prepared statement using the givensqlstring.- Parameters:
 sql- the sql- Returns:
 
 
- 
rxPrepare
public io.reactivex.rxjava3.core.Single<PreparedStatement> rxPrepare(String sql)
Create a prepared statement using the givensqlstring.- Parameters:
 sql- the sql- Returns:
 
 
- 
prepare
public io.reactivex.rxjava3.core.Single<PreparedStatement> prepare(String sql, PrepareOptions options)
Create a prepared statement using the givensqlstring.- Parameters:
 sql- the sqloptions-- Returns:
 
 
- 
rxPrepare
public io.reactivex.rxjava3.core.Single<PreparedStatement> rxPrepare(String sql, PrepareOptions options)
Create a prepared statement using the givensqlstring.- Parameters:
 sql- the sqloptions-- Returns:
 
 
- 
exceptionHandler
public SqlConnection exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.- Parameters:
 handler- the handler- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
closeHandler
public SqlConnection closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.- Parameters:
 handler- the handler- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
begin
public io.reactivex.rxjava3.core.Single<Transaction> begin()
Begin a transaction and returns aTransactionfor controlling and tracking this transaction. When the connection is explicitely closed, any inflight transaction is rollbacked.- Returns:
 
 
- 
rxBegin
public io.reactivex.rxjava3.core.Single<Transaction> rxBegin()
Begin a transaction and returns aTransactionfor controlling and tracking this transaction. When the connection is explicitely closed, any inflight transaction is rollbacked.- Returns:
 
 
- 
transaction
public Transaction transaction()
- Returns:
 - the current transaction if it exists, otherwise null
 
 
- 
isSSL
public boolean isSSL()
- Returns:
 - whether the connection uses SSL
 
 
- 
close
public io.reactivex.rxjava3.core.Completable close()
Close the current connection after all the pending commands have been processed. 
- 
rxClose
public io.reactivex.rxjava3.core.Completable rxClose()
Close the current connection after all the pending commands have been processed. 
- 
databaseMetadata
public DatabaseMetadata databaseMetadata()
- Returns:
 - The static metadata about the backend database server for this connection
 
 
- 
newInstance
public static SqlConnection newInstance(SqlConnection arg)
 
 - 
 
 -