io.vertx.rxjava3.mysqlclient

## Class MySQLPool

- java.lang.Object
- - io.vertx.rxjava3.sqlclient.SqlClient
  - - io.vertx.rxjava3.sqlclient.Pool
    - - io.vertx.rxjava3.mysqlclient.MySQLPool

-     public class MySQLPool
      extends Pool

  A of `MySQL Connections`.

  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<MySQLPool>` | `__TYPE_ARG`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SqlClient` | `client(List<MySQLConnectOptions> databases, PoolOptions options)` Create a client backed by a connection pool to the MySQL `databases` with round-robin selection.
    `static SqlClient` | `client(MySQLConnectOptions connectOptions, PoolOptions poolOptions)` Create a client backed by a connection pool to the database configured with the given `connectOptions` and `poolOptions`.
    `static SqlClient` | `client(String connectionUri)` Like `client(java.lang.String)` with a default `poolOptions`.
    `static SqlClient` | `client(String connectionUri, PoolOptions poolOptions)` Like `client(java.lang.String)` with `connectOptions` build from `connectionUri`.
    `static SqlClient` | `client(java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)` Create a client backed by a connection pool to the MySQL `databases`.
    `static SqlClient` | `client(Vertx vertx, List<MySQLConnectOptions> mySQLConnectOptions, PoolOptions options)` Like `client(java.lang.String)` with a specific instance.
    `static SqlClient` | `client(Vertx vertx, MySQLConnectOptions connectOptions, PoolOptions poolOptions)` Like `client(java.lang.String)` with a specific instance.
    `static SqlClient` | `client(Vertx vertx, String connectionUri)` Like `client(java.lang.String)` with a default `poolOptions`.
    `static SqlClient` | `client(Vertx vertx, String connectionUri, PoolOptions poolOptions)` Like `client(java.lang.String)` with `connectOptions` build from `connectionUri`.
    `static SqlClient` | `client(Vertx vertx, java.util.function.Supplier<Future<MySQLConnectOptions>> mySQLConnectOptions, PoolOptions options)` Like `client(java.lang.String)` with a specific instance.
    `MySQLPool` | `connectHandler(Handler<SqlConnection> handler)` Set an handler called when the pool has established a connection to the database.
    `MySQLPool` | `connectionProvider(java.util.function.Function<Context,Single<SqlConnection>> provider)` Replace the default pool connection provider, the new `provider` returns a future connection for a given .
    `boolean` | `equals(Object o)`
    `MySQLPool` | `getDelegate()`
    `int` | `hashCode()`
    `static MySQLPool` | `newInstance(MySQLPool arg)`
    `static MySQLPool` | `pool(List<MySQLConnectOptions> databases, PoolOptions options)` Create a connection pool to the MySQL `databases` with round-robin selection.
    `static MySQLPool` | `pool(MySQLConnectOptions database, PoolOptions options)` Create a connection pool to the MySQL `server` configured with the given `options`.
    `static MySQLPool` | `pool(String connectionUri)` Like `pool(java.lang.String)` with default options.
    `static MySQLPool` | `pool(String connectionUri, PoolOptions options)` Like `pool(java.lang.String)` with `database` built from `connectionUri`.
    `static MySQLPool` | `pool(java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)` Create a connection pool to the MySQL `databases`.
    `static MySQLPool` | `pool(Vertx vertx, List<MySQLConnectOptions> databases, PoolOptions options)` Like `pool(java.lang.String)` with a specific instance.
    `static MySQLPool` | `pool(Vertx vertx, MySQLConnectOptions database, PoolOptions options)` Like `pool(java.lang.String)` with a specific instance.
    `static MySQLPool` | `pool(Vertx vertx, String connectionUri)` Like `pool(java.lang.String)` with default options.
    `static MySQLPool` | `pool(Vertx vertx, String connectionUri, PoolOptions options)` Like `pool(java.lang.String)` with `database` built from `connectionUri`.
    `static MySQLPool` | `pool(Vertx vertx, java.util.function.Supplier<Future<MySQLConnectOptions>> databases, PoolOptions options)` Like `pool(java.lang.String)` with a specific instance.
    `String` | `toString()`

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

      `close, getConnection, newInstance, pool, pool, pool, preparedQuery, query, rxClose, rxGetConnection, rxWithConnection, rxWithTransaction, rxWithTransaction, size, withConnection, withTransaction, withTransaction`

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

      `newInstance, preparedQuery`

    - ### 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<MySQLPool> __TYPE_ARG

  - ### Constructor Detail

    - #### MySQLPool

          public MySQLPool(MySQLPool delegate)

    - #### MySQLPool

          public MySQLPool(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Pool`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Pool`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Pool`

    - #### getDelegate

          public MySQLPool getDelegate()

      Overrides:
        `getDelegate` in class `Pool`

    - #### pool

          public static MySQLPool pool(String connectionUri)

      Like `pool(java.lang.String)` with default options.
      Parameters:
        `connectionUri` -
      Returns:

    - #### pool

          public static MySQLPool pool(String connectionUri,
                                       PoolOptions options)

      Like `pool(java.lang.String)` with `database` built from `connectionUri`.
      Parameters:
        `connectionUri` -
        `options` -
      Returns:

    - #### pool

          public static MySQLPool pool(Vertx vertx,
                                       String connectionUri)

      Like `pool(java.lang.String)` with default options.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### pool

          public static MySQLPool pool(Vertx vertx,
                                       String connectionUri,
                                       PoolOptions options)

      Like `pool(java.lang.String)` with `database` built from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
        `options` -
      Returns:

    - #### pool

          public static MySQLPool pool(MySQLConnectOptions database,
                                       PoolOptions options)

      Create a connection pool to the MySQL `server` configured with the given `options`.
      Parameters:
        `database` - the options for the connection
        `options` - the options for creating the pool
      Returns:
        the connection pool

    - #### pool

          public static MySQLPool pool(Vertx vertx,
                                       MySQLConnectOptions database,
                                       PoolOptions options)

      Like `pool(java.lang.String)` with a specific instance.
      Parameters:
        `vertx` -
        `database` -
        `options` -
      Returns:

    - #### pool

          public static MySQLPool pool(List<MySQLConnectOptions> databases,
                                       PoolOptions options)

      Create a connection pool to the MySQL `databases` with round-robin selection. Round-robin is applied when a new connection is created by the pool.
      Parameters:
        `databases` - the list of servers
        `options` - the options for creating the pool
      Returns:
        the connection pool

    - #### pool

          public static MySQLPool pool(Vertx vertx,
                                       List<MySQLConnectOptions> databases,
                                       PoolOptions options)

      Like `pool(java.lang.String)` with a specific instance.
      Parameters:
        `vertx` -
        `databases` -
        `options` -
      Returns:

    - #### client

          public static SqlClient client(String connectionUri)

      Like `client(java.lang.String)` with a default `poolOptions`.
      Parameters:
        `connectionUri` -
      Returns:

    - #### client

          public static SqlClient client(String connectionUri,
                                         PoolOptions poolOptions)

      Like `client(java.lang.String)` with `connectOptions` build from `connectionUri`.
      Parameters:
        `connectionUri` -
        `poolOptions` -
      Returns:

    - #### client

          public static SqlClient client(Vertx vertx,
                                         String connectionUri)

      Like `client(java.lang.String)` with a default `poolOptions`.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### client

          public static SqlClient client(Vertx vertx,
                                         String connectionUri,
                                         PoolOptions poolOptions)

      Like `client(java.lang.String)` with `connectOptions` build from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
        `poolOptions` -
      Returns:

    - #### client

          public static SqlClient client(MySQLConnectOptions connectOptions,
                                         PoolOptions poolOptions)

      Create a client backed by a connection pool to the database configured with the given `connectOptions` and `poolOptions`.
      Parameters:
        `connectOptions` -
        `poolOptions` - the options for creating the backing pool
      Returns:
        the client

    - #### client

          public static SqlClient client(Vertx vertx,
                                         MySQLConnectOptions connectOptions,
                                         PoolOptions poolOptions)

      Like `client(java.lang.String)` with a specific instance.
      Parameters:
        `vertx` -
        `connectOptions` -
        `poolOptions` -
      Returns:

    - #### client

          public static SqlClient client(Vertx vertx,
                                         List<MySQLConnectOptions> mySQLConnectOptions,
                                         PoolOptions options)

      Like `client(java.lang.String)` with a specific instance.
      Parameters:
        `vertx` -
        `mySQLConnectOptions` -
        `options` -
      Returns:

    - #### client

          public static SqlClient client(List<MySQLConnectOptions> databases,
                                         PoolOptions options)

      Create a client backed by a connection pool to the MySQL `databases` with round-robin selection. Round-robin is applied when a new connection is created by the pool.
      Parameters:
        `databases` - the list of databases
        `options` - the options for creating the pool
      Returns:
        the pooled client

    - #### connectHandler

          public MySQLPool connectHandler(Handler<SqlConnection> handler)

      Description copied from class: `Pool`
      Set an handler called when the pool has established a connection to the database.

      This handler allows interactions with the database before the connection is added to the pool.

      When the handler has finished, it must call `SqlClient.close()` to release the connection to the pool.

      Overrides:
        `connectHandler` in class `Pool`
      Parameters:
        `handler` - the handler
      Returns:
        a reference to this, so the API can be used fluently

    - #### connectionProvider

          public MySQLPool connectionProvider(java.util.function.Function<Context,Single<SqlConnection>> provider)

      Description copied from class: `Pool`
      Replace the default pool connection provider, the new `provider` returns a future connection for a given .

      A `ConnectionFactory` can be used as connection provider.

      Overrides:
        `connectionProvider` in class `Pool`
      Parameters:
        `provider` - the new connection provider
      Returns:
        a reference to this, so the API can be used fluently

    - #### pool

          public static MySQLPool pool(java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
                                       PoolOptions options)

      Create a connection pool to the MySQL `databases`. The supplier is called to provide the options when a new connection is created by the pool.
      Parameters:
        `databases` - the server supplier
        `options` - the options for creating the pool
      Returns:
        the connection pool

    - #### pool

          public static MySQLPool pool(Vertx vertx,
                                       java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
                                       PoolOptions options)

      Like `pool(java.lang.String)` with a specific instance.
      Parameters:
        `vertx` -
        `databases` -
        `options` -
      Returns:

    - #### client

          public static SqlClient client(Vertx vertx,
                                         java.util.function.Supplier<Future<MySQLConnectOptions>> mySQLConnectOptions,
                                         PoolOptions options)

      Like `client(java.lang.String)` with a specific instance.
      Parameters:
        `vertx` -
        `mySQLConnectOptions` -
        `options` -
      Returns:

    - #### client

          public static SqlClient client(java.util.function.Supplier<Future<MySQLConnectOptions>> databases,
                                         PoolOptions options)

      Create a client backed by a connection pool to the MySQL `databases`. The supplier is called to provide the options when a new connection is created by the pool.
      Parameters:
        `databases` - the databases supplier
        `options` - the options for creating the pool
      Returns:
        the pooled client

    - #### newInstance

          public static MySQLPool newInstance(MySQLPool arg)

Copyright © 2024 Eclipse. All rights reserved.