Class MySQLConnection

  • All Implemented Interfaces:
    RxDelegate

    public class MySQLConnection
    extends SqlConnection
    implements 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.

    • Constructor Detail

      • MySQLConnection

        public MySQLConnection​(Object delegate)
    • Method Detail

      • connect

        public static io.reactivex.rxjava3.core.Single<MySQLConnection> connect​(Vertx vertx,
                                                                                MySQLConnectOptions connectOptions)
        Create a connection to MySQL server with the given connectOptions.
        Parameters:
        vertx - the vertx instance
        connectOptions - the options for the connection
        Returns:
      • rxConnect

        public static io.reactivex.rxjava3.core.Single<MySQLConnection> rxConnect​(Vertx vertx,
                                                                                  MySQLConnectOptions connectOptions)
        Create a connection to MySQL server with the given connectOptions.
        Parameters:
        vertx - the vertx instance
        connectOptions - the options for the connection
        Returns:
      • ping

        public io.reactivex.rxjava3.core.Completable ping()
        Send a PING command to check if the server is alive.
        Returns:
        a reference to this, so the API can be used fluently
      • rxPing

        public io.reactivex.rxjava3.core.Completable rxPing()
        Send a PING command to check if the server is alive.
        Returns:
        a reference to this, so the API can be used fluently
      • specifySchema

        public io.reactivex.rxjava3.core.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 reference to this, so the API can be used fluently
      • rxSpecifySchema

        public io.reactivex.rxjava3.core.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 reference to this, so the API can be used fluently
      • getInternalStatistics

        public io.reactivex.rxjava3.core.Single<String> getInternalStatistics()
        Send a STATISTICS command to get a human readable string of the server internal status.
        Returns:
        a reference to this, so the API can be used fluently
      • rxGetInternalStatistics

        public io.reactivex.rxjava3.core.Single<String> rxGetInternalStatistics()
        Send a STATISTICS command to get a human readable string of the server internal status.
        Returns:
        a reference to this, so the API can be used fluently
      • setOption

        public io.reactivex.rxjava3.core.Completable setOption​(MySQLSetOption option)
        Send a SET_OPTION command to set options for the current connection.
        Parameters:
        option - the options to set
        Returns:
        a reference to this, so the API can be used fluently
      • rxSetOption

        public io.reactivex.rxjava3.core.Completable rxSetOption​(MySQLSetOption option)
        Send a SET_OPTION command to set options for the current connection.
        Parameters:
        option - the options to set
        Returns:
        a reference to this, so the API can be used fluently
      • resetConnection

        public io.reactivex.rxjava3.core.Completable resetConnection()
        Send a RESET_CONNECTION command to reset the session state.
        Returns:
        a reference to this, so the API can be used fluently
      • rxResetConnection

        public io.reactivex.rxjava3.core.Completable rxResetConnection()
        Send a RESET_CONNECTION command to reset the session state.
        Returns:
        a reference to this, so the API can be used fluently
      • debug

        public io.reactivex.rxjava3.core.Completable debug()
        Send a DEBUG command to dump debug information to the server's stdout.
        Returns:
        a reference to this, so the API can be used fluently
      • rxDebug

        public io.reactivex.rxjava3.core.Completable rxDebug()
        Send a DEBUG command to dump debug information to the server's stdout.
        Returns:
        a reference to this, so the API can be used fluently
      • changeUser

        public io.reactivex.rxjava3.core.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 - authentication options
        Returns:
        a reference to this, so the API can be used fluently
      • rxChangeUser

        public io.reactivex.rxjava3.core.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 - authentication options
        Returns:
        a reference to this, so the API can be used fluently