Package io.vertx.rxjava3.mysqlclient
Class MySQLConnection
- java.lang.Object
 - 
- io.vertx.rxjava3.sqlclient.SqlClient
 - 
- io.vertx.rxjava3.sqlclient.SqlConnection
 - 
- io.vertx.rxjava3.mysqlclient.MySQLConnection
 
 
 
 
- 
- All Implemented Interfaces:
 io.vertx.lang.rx.RxDelegate
public class MySQLConnection extends SqlConnection implements io.vertx.lang.rx.RxDelegate
An interface which represents a connection to MySQL server.The connection object supports all the operations defined in the interface, in addition it provides MySQL utility command support:
- COM_PING
 - COM_CHANGE_USER
 - COM_RESET_CONNECTION
 - COM_DEBUG
 - COM_INIT_DB
 - COM_STATISTICS
 - COM_SET_OPTION
 
NOTE: This class has been automatically generated from the
originalnon RX-ified interface using Vert.x codegen. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<MySQLConnection>__TYPE_ARG 
- 
Constructor Summary
Constructors Constructor Description MySQLConnection(MySQLConnection delegate)MySQLConnection(Object delegate) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MySQLConnectioncast(SqlConnection sqlConnection)Cast a toMySQLConnection.CompletablechangeUser(MySQLAuthOptions options)Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.MySQLConnectioncloseHandler(Handler<Void> handler)Set an handler called when the connection is closed.static Single<MySQLConnection>connect(Vertx vertx, MySQLConnectOptions connectOptions)Create a connection to MySQL server with the givenconnectOptions.static Single<MySQLConnection>connect(Vertx vertx, String connectionUri)Likeconnect(io.vertx.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)with options built fromconnectionUri.Completabledebug()Send a DEBUG command to dump debug information to the server's stdout.booleanequals(Object o)MySQLConnectionexceptionHandler(Handler<Throwable> handler)Set an handler called with connection errors.MySQLConnectiongetDelegate()Single<String>getInternalStatistics()Send a STATISTICS command to get a human readable string of the server internal status.inthashCode()static MySQLConnectionnewInstance(MySQLConnection arg)Completableping()Send a PING command to check if the server is alive.CompletableresetConnection()Send a RESET_CONNECTION command to reset the session state.CompletablerxChangeUser(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 givenconnectOptions.static Single<MySQLConnection>rxConnect(Vertx vertx, String connectionUri)Likeconnect(io.vertx.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)with options built fromconnectionUri.CompletablerxDebug()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.CompletablerxPing()Send a PING command to check if the server is alive.CompletablerxResetConnection()Send a RESET_CONNECTION command to reset the session state.CompletablerxSetOption(MySQLSetOption option)Send a SET_OPTION command to set options for the current connection.CompletablerxSpecifySchema(String schemaName)Send a INIT_DB command to change the default schema of the connection.CompletablesetOption(MySQLSetOption option)Send a SET_OPTION command to set options for the current connection.CompletablespecifySchema(String schemaName)Send a INIT_DB command to change the default schema of the connection.StringtoString()- 
Methods inherited from class io.vertx.rxjava3.sqlclient.SqlConnection
begin, databaseMetadata, isSSL, newInstance, prepare, prepare, rxBegin, rxPrepare, rxPrepare, transaction 
- 
Methods inherited from class io.vertx.rxjava3.sqlclient.SqlClient
close, newInstance, preparedQuery, preparedQuery, query, rxClose 
 - 
 
 - 
 
- 
- 
Field Detail
- 
__TYPE_ARG
public static final io.vertx.lang.rx.TypeArg<MySQLConnection> __TYPE_ARG
 
 - 
 
- 
Constructor Detail
- 
MySQLConnection
public MySQLConnection(MySQLConnection delegate)
 
- 
MySQLConnection
public MySQLConnection(Object delegate)
 
 - 
 
- 
Method Detail
- 
toString
public String toString()
- Overrides:
 toStringin classSqlConnection
 
- 
equals
public boolean equals(Object o)
- Overrides:
 equalsin classSqlConnection
 
- 
hashCode
public int hashCode()
- Overrides:
 hashCodein classSqlConnection
 
- 
getDelegate
public MySQLConnection getDelegate()
- Specified by:
 getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
 getDelegatein classSqlConnection
 
- 
connect
public static Single<MySQLConnection> connect(Vertx vertx, MySQLConnectOptions connectOptions)
Create a connection to MySQL server with the givenconnectOptions.- Parameters:
 vertx- the vertx instanceconnectOptions- the options for the connection- Returns:
 - a future notified with the connection or the failure
 
 
- 
rxConnect
public static Single<MySQLConnection> rxConnect(Vertx vertx, MySQLConnectOptions connectOptions)
Create a connection to MySQL server with the givenconnectOptions.- Parameters:
 vertx- the vertx instanceconnectOptions- the options for the connection- Returns:
 - a future notified with the connection or the failure
 
 
- 
connect
public static Single<MySQLConnection> connect(Vertx vertx, String connectionUri)
Likeconnect(io.vertx.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)with options built fromconnectionUri.- Parameters:
 vertx-connectionUri-- Returns:
 
 
- 
rxConnect
public static Single<MySQLConnection> rxConnect(Vertx vertx, String connectionUri)
Likeconnect(io.vertx.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)with options built fromconnectionUri.- Parameters:
 vertx-connectionUri-- Returns:
 
 
- 
exceptionHandler
public MySQLConnection exceptionHandler(Handler<Throwable> handler)
Description copied from class:SqlConnectionSet an handler called with connection errors.- Overrides:
 exceptionHandlerin classSqlConnection- Parameters:
 handler-- Returns:
 
 
- 
closeHandler
public MySQLConnection closeHandler(Handler<Void> handler)
Description copied from class:SqlConnectionSet an handler called when the connection is closed.- Overrides:
 closeHandlerin classSqlConnection- Parameters:
 handler-- Returns:
 
 
- 
ping
public Completable ping()
Send a PING command to check if the server is alive.- Returns:
 - a future notified with the server response
 
 
- 
rxPing
public Completable rxPing()
Send a PING command to check if the server is alive.- Returns:
 - a future notified with the server response
 
 
- 
specifySchema
public Completable specifySchema(String schemaName)
Send a INIT_DB command to change the default schema of the connection.- Parameters:
 schemaName- name of the schema to change to- Returns:
 - a future notified with the execution result
 
 
- 
rxSpecifySchema
public Completable rxSpecifySchema(String schemaName)
Send a INIT_DB command to change the default schema of the connection.- Parameters:
 schemaName- name of the schema to change to- Returns:
 - a future notified with the execution result
 
 
- 
getInternalStatistics
public Single<String> getInternalStatistics()
Send a STATISTICS command to get a human readable string of the server internal status.- Returns:
 - a future notified with the execution result
 
 
- 
rxGetInternalStatistics
public Single<String> rxGetInternalStatistics()
Send a STATISTICS command to get a human readable string of the server internal status.- Returns:
 - a future notified with the execution result
 
 
- 
setOption
public Completable setOption(MySQLSetOption option)
Send a SET_OPTION command to set options for the current connection.- Parameters:
 option- the options to set- Returns:
 - a future notified with the execution result
 
 
- 
rxSetOption
public Completable rxSetOption(MySQLSetOption option)
Send a SET_OPTION command to set options for the current connection.- Parameters:
 option- the options to set- Returns:
 - a future notified with the execution result
 
 
- 
resetConnection
public Completable resetConnection()
Send a RESET_CONNECTION command to reset the session state.- Returns:
 - a future notified with the execution result
 
 
- 
rxResetConnection
public Completable rxResetConnection()
Send a RESET_CONNECTION command to reset the session state.- Returns:
 - a future notified with the execution result
 
 
- 
debug
public Completable debug()
Send a DEBUG command to dump debug information to the server's stdout.- Returns:
 - a future notified with the execution result
 
 
- 
rxDebug
public Completable rxDebug()
Send a DEBUG command to dump debug information to the server's stdout.- Returns:
 - a future notified with the execution result
 
 
- 
changeUser
public Completable changeUser(MySQLAuthOptions options)
Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.- Parameters:
 options-- Returns:
 - a future notified with the execution result
 
 
- 
rxChangeUser
public Completable rxChangeUser(MySQLAuthOptions options)
Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.- Parameters:
 options-- Returns:
 - a future notified with the execution result
 
 
- 
cast
public static MySQLConnection cast(SqlConnection sqlConnection)
Cast a toMySQLConnection. This is mostly useful for Vert.x generated APIs like RxJava/Mutiny.- Parameters:
 sqlConnection- the connection to cast- Returns:
 - a 
instance 
 
- 
newInstance
public static MySQLConnection newInstance(MySQLConnection arg)
 
 - 
 
 -