io.vertx.rxjava3.mysqlclient

## Class MySQLConnection

- java.lang.Object
- - io.vertx.rxjava3.sqlclient.SqlClient
  - - io.vertx.rxjava3.sqlclient.SqlConnection
    - - io.vertx.rxjava3.mysqlclient.MySQLConnection

-     public class MySQLConnection
      extends SqlConnection

  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
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<MySQLConnection>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MySQLConnection(MySQLConnection delegate)`
    `MySQLConnection(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MySQLConnection` | `cast(SqlConnection sqlConnection)` Cast a to `MySQLConnection`.
    `Completable` | `changeUser(MySQLAuthOptions options)` 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 Single<MySQLConnection>` | `connect(Vertx vertx, MySQLConnectOptions connectOptions)` Create a connection to MySQL server with the given `connectOptions`.
    `static Single<MySQLConnection>` | `connect(Vertx vertx, String connectionUri)` Like `connect(io.vertx.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)` with options built from `connectionUri`.
    `Completable` | `debug()` 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()`
    `Single<String>` | `getInternalStatistics()` Send a STATISTICS command to get a human readable string of the server internal status.
    `int` | `hashCode()`
    `static MySQLConnection` | `newInstance(MySQLConnection arg)`
    `Completable` | `ping()` Send a PING command to check if the server is alive.
    `Single<PreparedStatement>` | `prepare(String sql)` Create a prepared statement using the given `sql` string.
    `Completable` | `resetConnection()` Send a RESET_CONNECTION command to reset the session state.
    `Completable` | `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.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)` with options built from `connectionUri`.
    `Completable` | `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.
    `Completable` | `rxPing()` Send a PING command to check if the server is alive.
    `Single<PreparedStatement>` | `rxPrepare(String sql)` Create a prepared statement using the given `sql` string.
    `Completable` | `rxResetConnection()` Send a RESET_CONNECTION command to reset the session state.
    `Completable` | `rxSetOption(MySQLSetOption option)` Send a SET_OPTION command to set options for the current connection.
    `Completable` | `rxSpecifySchema(String schemaName)` Send a INIT_DB command to change the default schema of the connection.
    `Completable` | `setOption(MySQLSetOption option)` Send a SET_OPTION command to set options for the current connection.
    `Completable` | `specifySchema(String schemaName)` Send a INIT_DB command to change the default schema of the connection.
    `String` | `toString()`

    - ### Methods inherited from class io.vertx.rxjava3.sqlclient.SqlConnection

      `begin, close, databaseMetadata, isSSL, newInstance, prepare, rxBegin, rxClose, rxPrepare`

    - ### Methods inherited from class io.vertx.rxjava3.sqlclient.SqlClient

      `newInstance, preparedQuery, preparedQuery, query`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 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:
        `toString` in class `SqlConnection`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `SqlConnection`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `SqlConnection`

    - #### getDelegate

          public MySQLConnection getDelegate()

      Overrides:
        `getDelegate` in class `SqlConnection`

    - #### connect

          public static 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 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:

    - #### connect

          public static Single<MySQLConnection> connect(Vertx vertx,
                                                        String connectionUri)

      Like `connect(io.vertx.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)` with options built from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### rxConnect

          public static Single<MySQLConnection> rxConnect(Vertx vertx,
                                                          String connectionUri)

      Like `connect(io.vertx.rxjava3.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions)` with options built from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### prepare

          public Single<PreparedStatement> prepare(String sql)

      Description copied from class: `SqlConnection`
      Create a prepared statement using the given `sql` string.
      Overrides:
        `prepare` in class `SqlConnection`
      Parameters:
        `sql` -
      Returns:

    - #### rxPrepare

          public Single<PreparedStatement> rxPrepare(String sql)

      Description copied from class: `SqlConnection`
      Create a prepared statement using the given `sql` string.
      Overrides:
        `rxPrepare` in class `SqlConnection`
      Parameters:
        `sql` -
      Returns:

    - #### exceptionHandler

          public MySQLConnection exceptionHandler(Handler<Throwable> handler)

      Description copied from class: `SqlConnection`
      Set an handler called with connection errors.
      Overrides:
        `exceptionHandler` in class `SqlConnection`
      Parameters:
        `handler` -
      Returns:

    - #### closeHandler

          public MySQLConnection closeHandler(Handler<Void> handler)

      Description copied from class: `SqlConnection`
      Set an handler called when the connection is closed.
      Overrides:
        `closeHandler` in class `SqlConnection`
      Parameters:
        `handler` -
      Returns:

    - #### ping

          public 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 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 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 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 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 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 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 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 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 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 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 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 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 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

    - #### cast

          public static MySQLConnection cast(SqlConnection sqlConnection)

      Cast a to `MySQLConnection`. 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)

Copyright © 2022 Eclipse. All rights reserved.