Package io.vertx.reactivex.mysqlclient
Class MySQLConnection
- java.lang.Object
- 
- io.vertx.reactivex.sqlclient.SqlClient
- 
- io.vertx.reactivex.sqlclient.SqlConnection
- 
- io.vertx.reactivex.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 SummaryFields Modifier and Type Field Description static io.vertx.lang.rx.TypeArg<MySQLConnection>__TYPE_ARG
 - 
Constructor SummaryConstructors Constructor Description MySQLConnection(MySQLConnection delegate)MySQLConnection(Object delegate)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MySQLConnectioncast(SqlConnection sqlConnection)Cast a toMySQLConnection.Future<Void>changeUser(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 Future<MySQLConnection>connect(Vertx vertx, MySQLConnectOptions connectOptions)Create a connection to MySQL server with the givenconnectOptions.static Future<MySQLConnection>connect(Vertx vertx, String connectionUri)Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)with options built fromconnectionUri.Future<Void>debug()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()Future<String>getInternalStatistics()Send a STATISTICS command to get a human readable string of the server internal status.inthashCode()static MySQLConnectionnewInstance(MySQLConnection arg)Future<Void>ping()Send a PING command to check if the server is alive.Future<Void>resetConnection()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.reactivex.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.Future<Void>setOption(MySQLSetOption option)Send a SET_OPTION command to set options for the current connection.Future<Void>specifySchema(String schemaName)Send a INIT_DB command to change the default schema of the connection.StringtoString()- 
Methods inherited from class io.vertx.reactivex.sqlclient.SqlConnectionbegin, databaseMetadata, isSSL, newInstance, prepare, prepare, rxBegin, rxPrepare, rxPrepare, transaction
 - 
Methods inherited from class io.vertx.reactivex.sqlclient.SqlClientclose, newInstance, preparedQuery, preparedQuery, query, rxClose
 
- 
 
- 
- 
- 
Field Detail- 
__TYPE_ARGpublic static final io.vertx.lang.rx.TypeArg<MySQLConnection> __TYPE_ARG 
 
- 
 - 
Constructor Detail- 
MySQLConnectionpublic MySQLConnection(MySQLConnection delegate) 
 - 
MySQLConnectionpublic MySQLConnection(Object delegate) 
 
- 
 - 
Method Detail- 
toStringpublic String toString() - Overrides:
- toStringin class- SqlConnection
 
 - 
equalspublic boolean equals(Object o) - Overrides:
- equalsin class- SqlConnection
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- SqlConnection
 
 - 
getDelegatepublic MySQLConnection getDelegate() - Specified by:
- getDelegatein interface- io.vertx.lang.rx.RxDelegate
- Overrides:
- getDelegatein class- SqlConnection
 
 - 
connectpublic static Future<MySQLConnection> connect(Vertx vertx, MySQLConnectOptions connectOptions) Create a connection to MySQL server with the givenconnectOptions.- Parameters:
- vertx- the vertx instance
- connectOptions- the options for the connection
- Returns:
- a future notified with the connection or the failure
 
 - 
rxConnectpublic static Single<MySQLConnection> rxConnect(Vertx vertx, MySQLConnectOptions connectOptions) Create a connection to MySQL server with the givenconnectOptions.- Parameters:
- vertx- the vertx instance
- connectOptions- the options for the connection
- Returns:
- a future notified with the connection or the failure
 
 - 
connectpublic static Future<MySQLConnection> connect(Vertx vertx, String connectionUri) Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)with options built fromconnectionUri.- Parameters:
- vertx-
- connectionUri-
- Returns:
 
 - 
rxConnectpublic static Single<MySQLConnection> rxConnect(Vertx vertx, String connectionUri) Likeconnect(io.vertx.reactivex.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)with options built fromconnectionUri.- Parameters:
- vertx-
- connectionUri-
- Returns:
 
 - 
exceptionHandlerpublic MySQLConnection exceptionHandler(Handler<Throwable> handler) Description copied from class:SqlConnectionSet an handler called with connection errors.- Overrides:
- exceptionHandlerin class- SqlConnection
- Parameters:
- handler-
- Returns:
 
 - 
closeHandlerpublic MySQLConnection closeHandler(Handler<Void> handler) Description copied from class:SqlConnectionSet an handler called when the connection is closed.- Overrides:
- closeHandlerin class- SqlConnection
- Parameters:
- handler-
- Returns:
 
 - 
pingpublic Future<Void> ping() Send a PING command to check if the server is alive.- Returns:
- a future notified with the server response
 
 - 
rxPingpublic Completable rxPing() Send a PING command to check if the server is alive.- Returns:
- a future notified with the server response
 
 - 
specifySchemapublic Future<Void> 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
 
 - 
rxSpecifySchemapublic 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
 
 - 
getInternalStatisticspublic Future<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
 
 - 
rxGetInternalStatisticspublic 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
 
 - 
setOptionpublic Future<Void> 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
 
 - 
rxSetOptionpublic 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
 
 - 
resetConnectionpublic Future<Void> resetConnection() Send a RESET_CONNECTION command to reset the session state.- Returns:
- a future notified with the execution result
 
 - 
rxResetConnectionpublic Completable rxResetConnection() Send a RESET_CONNECTION command to reset the session state.- Returns:
- a future notified with the execution result
 
 - 
debugpublic Future<Void> debug() Send a DEBUG command to dump debug information to the server's stdout.- Returns:
- a future notified with the execution result
 
 - 
rxDebugpublic Completable rxDebug() Send a DEBUG command to dump debug information to the server's stdout.- Returns:
- a future notified with the execution result
 
 - 
changeUserpublic Future<Void> 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
 
 - 
rxChangeUserpublic 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
 
 - 
castpublic 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
 
 - 
newInstancepublic static MySQLConnection newInstance(MySQLConnection arg) 
 
- 
 
-