public class MySQLConnection extends SqlConnection
original
non RX-ified interface using Vert.x codegen.Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<MySQLConnection> |
__TYPE_ARG |
Constructor and Description |
---|
MySQLConnection(MySQLConnection delegate) |
MySQLConnection(Object delegate) |
Modifier and Type | Method and Description |
---|---|
MySQLConnection |
changeUser(MySQLAuthOptions 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<PreparedStatement>> handler)
Create a prepared query.
|
MySQLConnection |
resetConnection(Handler<AsyncResult<Void>> handler)
Send a RESET_CONNECTION command to reset the session state.
|
Single<Void> |
rxChangeUser(MySQLAuthOptions options)
Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.
|
static Single<MySQLConnection> |
rxConnect(Vertx vertx,
MySQLConnectOptions connectOptions)
Create a connection to MySQL server with the given
connectOptions . |
static 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 . |
Single<Void> |
rxDebug()
Send a DEBUG command to dump debug information to the server's stdout.
|
Single<String> |
rxGetInternalStatistics()
Send a STATISTICS command to get a human readable string of the server internal status.
|
Single<Void> |
rxPing()
Send a PING command to check if the server is alive.
|
Single<PreparedStatement> |
rxPrepare(String sql)
Create a prepared query.
|
Single<Void> |
rxResetConnection()
Send a RESET_CONNECTION command to reset the session state.
|
Single<Void> |
rxSetOption(MySQLSetOption option)
Send a SET_OPTION command to set options for the current connection.
|
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, databaseMetadata, isSSL, newInstance
newInstance, preparedQuery, query
public static final io.vertx.lang.rx.TypeArg<MySQLConnection> __TYPE_ARG
public MySQLConnection(MySQLConnection delegate)
public MySQLConnection(Object 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 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 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<PreparedStatement>> handler)
SqlConnection
prepare
in class SqlConnection
sql
- the sqlhandler
- the handler notified with the prepared query asynchronouslypublic Single<PreparedStatement> 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 ping(Handler<AsyncResult<Void>> handler)
handler
- the handler notified when the server responses to clientpublic 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 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 Single<String> rxGetInternalStatistics()
public MySQLConnection setOption(MySQLSetOption option, Handler<AsyncResult<Void>> handler)
option
- the options to sethandler
- the handler notified with the execution resultpublic Single<Void> rxSetOption(MySQLSetOption option)
option
- the options to setpublic MySQLConnection resetConnection(Handler<AsyncResult<Void>> handler)
handler
- the handler notified with the execution resultpublic Single<Void> rxResetConnection()
public MySQLConnection debug(Handler<AsyncResult<Void>> handler)
handler
- the handler notified with the execution resultpublic Single<Void> rxDebug()
public MySQLConnection changeUser(MySQLAuthOptions options, Handler<AsyncResult<Void>> handler)
options
- authentication optionshandler
- the handlerpublic Single<Void> rxChangeUser(MySQLAuthOptions options)
options
- authentication optionspublic static MySQLConnection newInstance(MySQLConnection arg)
Copyright © 2023 Eclipse. All rights reserved.