Package io.vertx.rxjava3.sqlclient
Class SqlConnection
java.lang.Object
io.vertx.rxjava3.sqlclient.SqlClient
io.vertx.rxjava3.sqlclient.SqlConnection
- All Implemented Interfaces:
RxDelegate
- Direct Known Subclasses:
DB2Connection,JDBCConnection,MSSQLConnection,MySQLConnection,OracleConnection,PgConnection
A connection to the database server.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Transaction>begin()Begin a transaction and returns aTransactionfor controlling and tracking this transaction.closeHandler(Handler<Void> handler) Set an handler called when the connection is closed.booleanexceptionHandler(Handler<Throwable> handler) Set an handler called with connection errors.inthashCode()booleanisSSL()static SqlConnectionnewInstance(SqlConnection arg) io.reactivex.rxjava3.core.Single<PreparedStatement>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.Single<PreparedStatement>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.toString()Methods inherited from class io.vertx.rxjava3.sqlclient.SqlClient
close, newInstance, preparedQuery, preparedQuery, query, rxClose
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
SqlConnection
-
SqlConnection
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate- Overrides:
getDelegatein classSqlClient
-
prepare
Create a prepared statement using the givensqlstring.- Parameters:
sql- the sql- Returns:
- a future notified with the prepared statement
-
rxPrepare
Create a prepared statement using the givensqlstring.- Parameters:
sql- the sql- Returns:
- a future notified with the prepared statement
-
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:
- a future notified with the prepared statement
-
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:
- a future notified with the prepared statement
-
exceptionHandler
Set an handler called with connection errors.- Parameters:
handler- the handler- Returns:
- a reference to this, so the API can be used fluently
-
closeHandler
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
Begin a transaction and returns aTransactionfor controlling and tracking this transaction. When the connection is explicitely closed, any inflight transaction is rollbacked.- Returns:
- a future notified with the transactino
-
rxBegin
Begin a transaction and returns aTransactionfor controlling and tracking this transaction. When the connection is explicitely closed, any inflight transaction is rollbacked.- Returns:
- a future notified with the transactino
-
transaction
- Returns:
- the current transaction if it exists, otherwise null
-
isSSL
public boolean isSSL()- Returns:
- whether the connection uses SSL
-
databaseMetadata
- Returns:
- The static metadata about the backend database server for this connection
-
newInstance
-