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
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 original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MySQLConnectioncast(SqlConnection sqlConnection) Cast a toMySQLConnection.changeUser(MySQLAuthOptions options) Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.closeHandler(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> Likeconnect(Vertx, MySQLConnectOptions)with options built fromconnectionUri.debug()Send a DEBUG command to dump debug information to the server's stdout.booleanexceptionHandler(Handler<Throwable> handler) Set an handler called with connection errors.Send a STATISTICS command to get a human readable string of the server internal status.inthashCode()static MySQLConnectionping()Send a PING command to check if the server is alive.Send a RESET_CONNECTION command to reset the session state.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 givenconnectOptions.static Single<MySQLConnection> Likeconnect(Vertx, MySQLConnectOptions)with options built fromconnectionUri.rxDebug()Send a DEBUG command to dump debug information to the server's stdout.Send a STATISTICS command to get a human readable string of the server internal status.rxPing()Send a PING command to check if the server is alive.Send a RESET_CONNECTION command to reset the session state.rxSetOption(MySQLSetOption option) Send a SET_OPTION command to set options for the current connection.rxSpecifySchema(String schemaName) Send a INIT_DB command to change the default schema of the connection.setOption(MySQLSetOption option) Send a SET_OPTION command to set options for the current connection.specifySchema(String schemaName) Send a INIT_DB command to change the default schema of the connection.toString()Methods inherited from class SqlConnection
begin, databaseMetadata, isSSL, newInstance, prepare, prepare, rxBegin, rxPrepare, rxPrepare, transactionMethods inherited from class SqlClient
close, newInstance, preparedQuery, preparedQuery, query, rxClose
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
MySQLConnection
-
MySQLConnection
-
-
Method Details
-
toString
- Overrides:
toStringin classSqlConnection
-
equals
- Overrides:
equalsin classSqlConnection
-
hashCode
public int hashCode()- Overrides:
hashCodein classSqlConnection
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate- Overrides:
getDelegatein classSqlConnection
-
connect
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
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
Likeconnect(Vertx, MySQLConnectOptions)with options built fromconnectionUri.- Parameters:
vertx-connectionUri-- Returns:
-
rxConnect
Likeconnect(Vertx, MySQLConnectOptions)with options built fromconnectionUri.- Parameters:
vertx-connectionUri-- Returns:
-
exceptionHandler
Description copied from class:SqlConnectionSet an handler called with connection errors.- Overrides:
exceptionHandlerin classSqlConnection- Parameters:
handler-- Returns:
-
closeHandler
Description copied from class:SqlConnectionSet an handler called when the connection is closed.- Overrides:
closeHandlerin classSqlConnection- Parameters:
handler-- Returns:
-
ping
Send a PING command to check if the server is alive.- Returns:
- a future notified with the server response
-
rxPing
Send a PING command to check if the server is alive.- Returns:
- a future notified with the server response
-
specifySchema
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
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
-
rxGetInternalStatistics
-
setOption
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
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
Send a RESET_CONNECTION command to reset the session state.- Returns:
- a future notified with the execution result
-
rxResetConnection
Send a RESET_CONNECTION command to reset the session state.- Returns:
- a future notified with the execution result
-
debug
Send a DEBUG command to dump debug information to the server's stdout.- Returns:
- a future notified with the execution result
-
rxDebug
Send a DEBUG command to dump debug information to the server's stdout.- Returns:
- a future notified with the execution result
-
changeUser
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
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
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
-