Class SqlConnection
java.lang.Object
io.vertx.reactivex.sqlclient.SqlClient
io.vertx.reactivex.sqlclient.SqlConnection
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
- Direct Known Subclasses:
DB2Connection, JDBCConnection, MSSQLConnection, MySQLConnection, OracleConnection, PgConnection
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbegin()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) Create a prepared statement using the givensqlstring.prepare(String sql, PrepareOptions options) Create a prepared statement using the givensqlstring.rxBegin()Begin a transaction and returns aTransactionfor controlling and tracking this transaction.Create a prepared statement using the givensqlstring.rxPrepare(String sql, PrepareOptions options) Create a prepared statement using the givensqlstring.toString()Methods inherited from class SqlClient
close, newInstance, preparedQuery, preparedQuery, query, rxClose
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
SqlConnection
-
SqlConnection
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- 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
Create a prepared statement using the givensqlstring.- Parameters:
sql- the sqloptions-- Returns:
- a future notified with the prepared statement
-
rxPrepare
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
-