public class MySQLConnection extends SqlConnection
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static TypeArg<MySQLConnection> |
__TYPE_ARG |
Constructor and Description |
---|
MySQLConnection(MySQLConnection delegate) |
Modifier and Type | Method and Description |
---|---|
MySQLConnection |
changeUser(MySQLConnectOptions options,
Handler<AsyncResult<Void>> handler)
Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.
|
MySQLConnection |
closeHandler(Handler<Void> handler)
Set an handler called when the connection is closed.
|
static void |
connect(Vertx vertx,
MySQLConnectOptions connectOptions,
Handler<AsyncResult<MySQLConnection>> handler)
Create a connection to MySQL server with the given
connectOptions . |
static void |
connect(Vertx vertx,
String connectionUri,
Handler<AsyncResult<MySQLConnection>> handler)
Like
connect(io.vertx.rxjava.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.mysqlclient.MySQLConnection>>) with options build from connectionUri . |
MySQLConnection |
debug(Handler<AsyncResult<Void>> handler)
Send a DEBUG command to dump debug information to the server's stdout.
|
boolean |
equals(Object o) |
MySQLConnection |
exceptionHandler(Handler<Throwable> handler)
Set an handler called with connection errors.
|
MySQLConnection |
getDelegate() |
MySQLConnection |
getInternalStatistics(Handler<AsyncResult<String>> handler)
Send a STATISTICS command to get a human readable string of the server internal status.
|
int |
hashCode() |
static MySQLConnection |
newInstance(MySQLConnection arg) |
MySQLConnection |
ping(Handler<AsyncResult<Void>> handler)
Send a PING command to check if the server is alive.
|
MySQLConnection |
prepare(String sql,
Handler<AsyncResult<PreparedQuery>> handler)
Create a prepared query.
|
MySQLConnection |
preparedQuery(String sql,
Handler<AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
MySQLConnection |
preparedQuery(String sql,
Tuple arguments,
Handler<AsyncResult<RowSet>> handler)
Prepare and execute a query.
|
MySQLConnection |
query(String sql,
Handler<AsyncResult<RowSet>> handler)
Execute a simple query.
|
MySQLConnection |
resetConnection(Handler<AsyncResult<Void>> handler)
Send a RESET_CONNECTION command to reset the session state.
|
rx.Single<Void> |
rxChangeUser(MySQLConnectOptions options)
Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.
|
static rx.Single<MySQLConnection> |
rxConnect(Vertx vertx,
MySQLConnectOptions connectOptions)
Create a connection to MySQL server with the given
connectOptions . |
static rx.Single<MySQLConnection> |
rxConnect(Vertx vertx,
String connectionUri)
Like
connect(io.vertx.rxjava.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.mysqlclient.MySQLConnection>>) with options build from connectionUri . |
rx.Single<Void> |
rxDebug()
Send a DEBUG command to dump debug information to the server's stdout.
|
rx.Single<String> |
rxGetInternalStatistics()
Send a STATISTICS command to get a human readable string of the server internal status.
|
rx.Single<Void> |
rxPing()
Send a PING command to check if the server is alive.
|
rx.Single<PreparedQuery> |
rxPrepare(String sql)
Create a prepared query.
|
rx.Single<RowSet> |
rxPreparedQuery(String sql)
Prepare and execute a query.
|
rx.Single<RowSet> |
rxPreparedQuery(String sql,
Tuple arguments)
Prepare and execute a query.
|
rx.Single<RowSet> |
rxQuery(String sql)
Execute a simple query.
|
rx.Single<Void> |
rxResetConnection()
Send a RESET_CONNECTION command to reset the session state.
|
rx.Single<Void> |
rxSetOption(MySQLSetOption option)
Send a SET_OPTION command to set options for the current connection.
|
rx.Single<Void> |
rxSpecifySchema(String schemaName)
Send a INIT_DB command to change the default schema of the connection.
|
MySQLConnection |
setOption(MySQLSetOption option,
Handler<AsyncResult<Void>> handler)
Send a SET_OPTION command to set options for the current connection.
|
MySQLConnection |
specifySchema(String schemaName,
Handler<AsyncResult<Void>> handler)
Send a INIT_DB command to change the default schema of the connection.
|
String |
toString() |
begin, close, isSSL, newInstance, preparedBatch, rxPreparedBatch
newInstance
public static final TypeArg<MySQLConnection> __TYPE_ARG
public MySQLConnection(MySQLConnection delegate)
public String toString()
toString
in class SqlConnection
public boolean equals(Object o)
equals
in class SqlConnection
public int hashCode()
hashCode
in class SqlConnection
public MySQLConnection getDelegate()
getDelegate
in class SqlConnection
public static void connect(Vertx vertx, MySQLConnectOptions connectOptions, Handler<AsyncResult<MySQLConnection>> handler)
connectOptions
.vertx
- the vertx instanceconnectOptions
- the options for the connectionhandler
- the handler called with the connection or the failurepublic static rx.Single<MySQLConnection> rxConnect(Vertx vertx, MySQLConnectOptions connectOptions)
connectOptions
.vertx
- the vertx instanceconnectOptions
- the options for the connectionpublic static void connect(Vertx vertx, String connectionUri, Handler<AsyncResult<MySQLConnection>> handler)
connect(io.vertx.rxjava.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.mysqlclient.MySQLConnection>>)
with options build from connectionUri
.vertx
- connectionUri
- handler
- public static rx.Single<MySQLConnection> rxConnect(Vertx vertx, String connectionUri)
connect(io.vertx.rxjava.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.rxjava.mysqlclient.MySQLConnection>>)
with options build from connectionUri
.vertx
- connectionUri
- public MySQLConnection prepare(String sql, Handler<AsyncResult<PreparedQuery>> handler)
SqlConnection
prepare
in class SqlConnection
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslypublic rx.Single<PreparedQuery> rxPrepare(String sql)
SqlConnection
rxPrepare
in class SqlConnection
sql
- the sqlpublic MySQLConnection exceptionHandler(Handler<Throwable> handler)
SqlConnection
exceptionHandler
in class SqlConnection
handler
- the handlerpublic MySQLConnection closeHandler(Handler<Void> handler)
SqlConnection
closeHandler
in class SqlConnection
handler
- the handlerpublic MySQLConnection preparedQuery(String sql, Handler<AsyncResult<RowSet>> handler)
SqlClient
preparedQuery
in class SqlConnection
sql
- the prepared query SQLhandler
- the handler notified with the execution resultpublic rx.Single<RowSet> rxPreparedQuery(String sql)
SqlClient
rxPreparedQuery
in class SqlConnection
sql
- the prepared query SQLpublic MySQLConnection query(String sql, Handler<AsyncResult<RowSet>> handler)
SqlClient
query
in class SqlConnection
sql
- the query SQLhandler
- the handler notified with the execution resultpublic rx.Single<RowSet> rxQuery(String sql)
SqlClient
rxQuery
in class SqlConnection
sql
- the query SQLpublic MySQLConnection preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet>> handler)
SqlClient
preparedQuery
in class SqlConnection
sql
- the prepared query SQLarguments
- the list of argumentshandler
- the handler notified with the execution resultpublic rx.Single<RowSet> rxPreparedQuery(String sql, Tuple arguments)
SqlClient
rxPreparedQuery
in class SqlConnection
sql
- the prepared query SQLarguments
- the list of argumentspublic MySQLConnection ping(Handler<AsyncResult<Void>> handler)
handler
- the handler notified when the server responses to clientpublic rx.Single<Void> rxPing()
public MySQLConnection specifySchema(String schemaName, Handler<AsyncResult<Void>> handler)
schemaName
- name of the schema to change tohandler
- the handler notified with the execution resultpublic rx.Single<Void> rxSpecifySchema(String schemaName)
schemaName
- name of the schema to change topublic MySQLConnection getInternalStatistics(Handler<AsyncResult<String>> handler)
handler
- the handler notified with the execution resultpublic rx.Single<String> rxGetInternalStatistics()
public MySQLConnection setOption(MySQLSetOption option, Handler<AsyncResult<Void>> handler)
option
- the options to sethandler
- the handler notified with the execution resultpublic rx.Single<Void> rxSetOption(MySQLSetOption option)
option
- the options to setpublic MySQLConnection resetConnection(Handler<AsyncResult<Void>> handler)
handler
- the handler notified with the execution resultpublic rx.Single<Void> rxResetConnection()
public MySQLConnection debug(Handler<AsyncResult<Void>> handler)
handler
- the handler notified with the execution resultpublic rx.Single<Void> rxDebug()
public MySQLConnection changeUser(MySQLConnectOptions options, Handler<AsyncResult<Void>> handler)
options
- authentication options, only username, password, database, collation and properties will be used.handler
- the handlerpublic rx.Single<Void> rxChangeUser(MySQLConnectOptions options)
options
- authentication options, only username, password, database, collation and properties will be used.public static MySQLConnection newInstance(MySQLConnection arg)
Copyright © 2019 Eclipse. All rights reserved.