io.vertx.reactivex.mysqlclient

## Class MySQLConnection

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

-     public class MySQLConnection
      extends SqlConnection

  A connection to MySQL server.

  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)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MySQLConnection` | `changeUser(MySQLConnectOptions options, Handler<AsyncResult<Void>> handler)` 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 void` | `connect(Vertx vertx, MySQLConnectOptions connectOptions, Handler<AsyncResult<MySQLConnection>> handler)` Create a connection to MySQL server with the given `connectOptions`.
    `static void` | `connect(Vertx vertx, String connectionUri, Handler<AsyncResult<MySQLConnection>> handler)` Like `connect(io.vertx.reactivex.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.mysqlclient.MySQLConnection>>)` with options build from `connectionUri`.
    `MySQLConnection` | `debug(Handler<AsyncResult<Void>> handler)` 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()`
    `MySQLConnection` | `getInternalStatistics(Handler<AsyncResult<String>> handler)` Send a STATISTICS command to get a human readable string of the server internal status.
    `int` | `hashCode()`
    `static MySQLConnection` | `newInstance(MySQLConnection arg)`
    `MySQLConnection` | `ping(Handler<AsyncResult<Void>> handler)` Send a PING command to check if the server is alive.
    `MySQLConnection` | `prepare(String sql, Handler<AsyncResult<PreparedQuery>> handler)` Create a prepared query.
    `MySQLConnection` | `preparedQuery(String sql, Handler<AsyncResult<RowSet>> handler)` Prepare and execute a query.
    `MySQLConnection` | `preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet>> handler)` Prepare and execute a query.
    `MySQLConnection` | `query(String sql, Handler<AsyncResult<RowSet>> handler)` Execute a simple query.
    `MySQLConnection` | `resetConnection(Handler<AsyncResult<Void>> handler)` Send a RESET_CONNECTION command to reset the session state.
    `Completable` | `rxChangeUser(MySQLConnectOptions 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.reactivex.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.mysqlclient.MySQLConnection>>)` with options build 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<PreparedQuery>` | `rxPrepare(String sql)` Create a prepared query.
    `Single<RowSet>` | `rxPreparedQuery(String sql)` Prepare and execute a query.
    `Single<RowSet>` | `rxPreparedQuery(String sql, Tuple arguments)` Prepare and execute a query.
    `Single<RowSet>` | `rxQuery(String sql)` Execute a simple query.
    `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.
    `MySQLConnection` | `setOption(MySQLSetOption option, Handler<AsyncResult<Void>> handler)` Send a SET_OPTION command to set options for the current connection.
    `MySQLConnection` | `specifySchema(String schemaName, Handler<AsyncResult<Void>> handler)` Send a INIT_DB command to change the default schema of the connection.
    `String` | `toString()`

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

      `begin, close, isSSL, newInstance, preparedBatch, rxPreparedBatch`

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

      `newInstance`

    - ### 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)

  - ### 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 void connect(Vertx vertx,
                                     MySQLConnectOptions connectOptions,
                                     Handler<AsyncResult<MySQLConnection>> handler)

      Create a connection to MySQL server with the given `connectOptions`.
      Parameters:
        `vertx` - the vertx instance
        `connectOptions` - the options for the connection
        `handler` - the handler called with the connection or the failure

    - #### 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 void connect(Vertx vertx,
                                     String connectionUri,
                                     Handler<AsyncResult<MySQLConnection>> handler)

      Like `connect(io.vertx.reactivex.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.mysqlclient.MySQLConnection>>)` with options build from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
        `handler` -

    - #### rxConnect

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

      Like `connect(io.vertx.reactivex.core.Vertx, io.vertx.mysqlclient.MySQLConnectOptions, io.vertx.core.Handler<io.vertx.core.AsyncResult<io.vertx.reactivex.mysqlclient.MySQLConnection>>)` with options build from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### prepare

          public MySQLConnection prepare(String sql,
                                         Handler<AsyncResult<PreparedQuery>> handler)

      Description copied from class: `SqlConnection`
      Create a prepared query.
      Overrides:
        `prepare` in class `SqlConnection`
      Parameters:
        `sql` - the sql
        `handler` - the handler notified with the prepared query asynchronously
      Returns:

    - #### rxPrepare

          public Single<PreparedQuery> rxPrepare(String sql)

      Description copied from class: `SqlConnection`
      Create a prepared query.
      Overrides:
        `rxPrepare` in class `SqlConnection`
      Parameters:
        `sql` - the 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` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### 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` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedQuery

          public MySQLConnection preparedQuery(String sql,
                                               Handler<AsyncResult<RowSet>> handler)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `preparedQuery` in class `SqlConnection`
      Parameters:
        `sql` - the prepared query SQL
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxPreparedQuery

          public Single<RowSet> rxPreparedQuery(String sql)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `rxPreparedQuery` in class `SqlConnection`
      Parameters:
        `sql` - the prepared query SQL
      Returns:
        a reference to this, so the API can be used fluently

    - #### query

          public MySQLConnection query(String sql,
                                       Handler<AsyncResult<RowSet>> handler)

      Description copied from class: `SqlClient`
      Execute a simple query.
      Overrides:
        `query` in class `SqlConnection`
      Parameters:
        `sql` - the query SQL
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxQuery

          public Single<RowSet> rxQuery(String sql)

      Description copied from class: `SqlClient`
      Execute a simple query.
      Overrides:
        `rxQuery` in class `SqlConnection`
      Parameters:
        `sql` - the query SQL
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedQuery

          public MySQLConnection preparedQuery(String sql,
                                               Tuple arguments,
                                               Handler<AsyncResult<RowSet>> handler)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `preparedQuery` in class `SqlConnection`
      Parameters:
        `sql` - the prepared query SQL
        `arguments` - the list of arguments
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxPreparedQuery

          public Single<RowSet> rxPreparedQuery(String sql,
                                                Tuple arguments)

      Description copied from class: `SqlClient`
      Prepare and execute a query.
      Overrides:
        `rxPreparedQuery` in class `SqlConnection`
      Parameters:
        `sql` - the prepared query SQL
        `arguments` - the list of arguments
      Returns:
        a reference to this, so the API can be used fluently

    - #### ping

          public MySQLConnection ping(Handler<AsyncResult<Void>> handler)

      Send a PING command to check if the server is alive.
      Parameters:
        `handler` - the handler notified when the server responses to client
      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 MySQLConnection specifySchema(String schemaName,
                                               Handler<AsyncResult<Void>> handler)

      Send a INIT_DB command to change the default schema of the connection.
      Parameters:
        `schemaName` - name of the schema to change to
        `handler` - the handler notified with the execution result
      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 MySQLConnection getInternalStatistics(Handler<AsyncResult<String>> handler)

      Send a STATISTICS command to get a human readable string of the server internal status.
      Parameters:
        `handler` - the handler notified with the execution result
      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 MySQLConnection setOption(MySQLSetOption option,
                                           Handler<AsyncResult<Void>> handler)

      Send a SET_OPTION command to set options for the current connection.
      Parameters:
        `option` - the options to set
        `handler` - the handler notified with the execution result
      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 MySQLConnection resetConnection(Handler<AsyncResult<Void>> handler)

      Send a RESET_CONNECTION command to reset the session state.
      Parameters:
        `handler` - the handler notified with the execution result
      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 MySQLConnection debug(Handler<AsyncResult<Void>> handler)

      Send a DEBUG command to dump debug information to the server's stdout.
      Parameters:
        `handler` - the handler notified with the execution result
      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 MySQLConnection changeUser(MySQLConnectOptions options,
                                            Handler<AsyncResult<Void>> handler)

      Send a CHANGE_USER command to change the user of the current connection, this operation will also reset connection state.
      Parameters:
        `options` - authentication options, only username, password, database, collation and properties will be used.
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### rxChangeUser

          public Completable rxChangeUser(MySQLConnectOptions 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, only username, password, database, collation and properties will be used.
      Returns:
        a reference to this, so the API can be used fluently

    - #### newInstance

          public static MySQLConnection newInstance(MySQLConnection arg)

Copyright © 2019 Eclipse. All rights reserved.