io.vertx.rxjava3.pgclient

## Class PgPool

- java.lang.Object
- - io.vertx.rxjava3.sqlclient.SqlClient
  - - io.vertx.rxjava3.sqlclient.Pool
    - - io.vertx.rxjava3.pgclient.PgPool

-     public class PgPool
      extends Pool

  A of `PostgreSQL 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<PgPool>` | `__TYPE_ARG`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SqlClient` | `client()` Like `client()` with default options.
    `static SqlClient` | `client(List<PgConnectOptions> databases, PoolOptions options)` Create a client backed by a connection pool to the PostgreSQL `databases` with round-robin selection.
    `static SqlClient` | `client(PgConnectOptions database, PoolOptions options)` Create a client backed by a connection pool to the PostgreSQL `database` configured with the given `options`.
    `static SqlClient` | `client(PoolOptions options)` Like `client()` with `database` retrieved from the environment variables.
    `static SqlClient` | `client(String connectionUri)` Like `pool()` with default options.
    `static SqlClient` | `client(String connectionUri, PoolOptions options)` Like `client()` with `database` retrieved from the `connectionUri`.
    `static SqlClient` | `client(Vertx vertx, List<PgConnectOptions> databases, PoolOptions options)` Like `client()` with a specific instance.
    `static SqlClient` | `client(Vertx vertx, PgConnectOptions database, PoolOptions options)` Like `client()` with a specific instance.
    `static SqlClient` | `client(Vertx vertx, PoolOptions poolOptions)` Like `client()` with `database` retrieved from the environment variables.
    `static SqlClient` | `client(Vertx vertx, String connectionUri)` Like `client()` with default options.
    `static SqlClient` | `client(Vertx vertx, String connectionUri, PoolOptions options)` Like `client()` with `database` build from `connectionUri`.
    `PgPool` | `connectHandler(Handler<SqlConnection> handler)` Set an handler called when the pool has established a connection to the database.
    `PgPool` | `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)`
    `PgPool` | `getDelegate()`
    `int` | `hashCode()`
    `static PgPool` | `newInstance(PgPool arg)`
    `static PgPool` | `pool()` Like `pool()` with a default `poolOptions`.
    `static PgPool` | `pool(List<PgConnectOptions> databases, PoolOptions poolOptions)` Create a connection pool to the PostgreSQL `databases` with round-robin selection.
    `static PgPool` | `pool(PgConnectOptions database, PoolOptions options)` Create a connection pool to the PostgreSQL `database` configured with the given `options`.
    `static PgPool` | `pool(PoolOptions options)` Like `pool()` with `connectOptions` build from the environment variables.
    `static PgPool` | `pool(String connectionUri)` Like `pool()` with a default `poolOptions`.
    `static PgPool` | `pool(String connectionUri, PoolOptions options)` Like `pool()` with `connectOptions` build from `connectionUri`.
    `static PgPool` | `pool(Vertx vertx, List<PgConnectOptions> databases, PoolOptions poolOptions)` Like `pool()` with a specific instance.
    `static PgPool` | `pool(Vertx vertx, PgConnectOptions database, PoolOptions options)` Like `pool()` with a specific instance.
    `static PgPool` | `pool(Vertx vertx, PoolOptions options)` Like `pool()` with the `database` retrieved from the environment variables.
    `static PgPool` | `pool(Vertx vertx, String connectionUri)` Like `pool()` with default options.
    `static PgPool` | `pool(Vertx vertx, String connectionUri, PoolOptions poolOptions)` Like `pool()` with `database` retrieved from the given `connectionUri`.
    `String` | `toString()`

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

      `close, getConnection, newInstance, pool, pool, pool, preparedQuery, query, rxClose, rxGetConnection, rxWithConnection, rxWithTransaction, size, withConnection, 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<PgPool> __TYPE_ARG

  - ### Constructor Detail

    - #### PgPool

          public PgPool(PgPool delegate)

    - #### PgPool

          public PgPool(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 PgPool getDelegate()

      Overrides:
        `getDelegate` in class `Pool`

    - #### pool

          public static PgPool pool()

      Like `pool()` with a default `poolOptions`.
      Returns:

    - #### pool

          public static PgPool pool(PoolOptions options)

      Like `pool()` with `connectOptions` build from the environment variables.
      Parameters:
        `options` -
      Returns:

    - #### pool

          public static PgPool pool(String connectionUri)

      Like `pool()` with a default `poolOptions`.
      Parameters:
        `connectionUri` -
      Returns:

    - #### pool

          public static PgPool pool(String connectionUri,
                                    PoolOptions options)

      Like `pool()` with `connectOptions` build from `connectionUri`.
      Parameters:
        `connectionUri` -
        `options` -
      Returns:

    - #### pool

          public static PgPool pool(Vertx vertx,
                                    String connectionUri)

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

    - #### pool

          public static PgPool pool(Vertx vertx,
                                    PoolOptions options)

      Like `pool()` with the `database` retrieved from the environment variables.
      Parameters:
        `vertx` -
        `options` -
      Returns:

    - #### pool

          public static PgPool pool(Vertx vertx,
                                    String connectionUri,
                                    PoolOptions poolOptions)

      Like `pool()` with `database` retrieved from the given `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
        `poolOptions` -
      Returns:

    - #### pool

          public static PgPool pool(PgConnectOptions database,
                                    PoolOptions options)

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

    - #### pool

          public static PgPool pool(Vertx vertx,
                                    PgConnectOptions database,
                                    PoolOptions options)

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

    - #### pool

          public static PgPool pool(List<PgConnectOptions> databases,
                                    PoolOptions poolOptions)

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

    - #### pool

          public static PgPool pool(Vertx vertx,
                                    List<PgConnectOptions> databases,
                                    PoolOptions poolOptions)

      Like `pool()` with a specific instance.
      Parameters:
        `vertx` -
        `databases` -
        `poolOptions` -
      Returns:

    - #### client

          public static SqlClient client()

      Like `client()` with default options.
      Returns:

    - #### client

          public static SqlClient client(PoolOptions options)

      Like `client()` with `database` retrieved from the environment variables.
      Parameters:
        `options` -
      Returns:

    - #### client

          public static SqlClient client(String connectionUri)

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

    - #### client

          public static SqlClient client(String connectionUri,
                                         PoolOptions options)

      Like `client()` with `database` retrieved from the `connectionUri`.
      Parameters:
        `connectionUri` -
        `options` -
      Returns:

    - #### client

          public static SqlClient client(Vertx vertx,
                                         String connectionUri)

      Like `client()` with default options.
      Parameters:
        `vertx` -
        `connectionUri` -
      Returns:

    - #### client

          public static SqlClient client(Vertx vertx,
                                         PoolOptions poolOptions)

      Like `client()` with `database` retrieved from the environment variables.
      Parameters:
        `vertx` -
        `poolOptions` -
      Returns:

    - #### client

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

      Like `client()` with `database` build from `connectionUri`.
      Parameters:
        `vertx` -
        `connectionUri` -
        `options` -
      Returns:

    - #### client

          public static SqlClient client(PgConnectOptions database,
                                         PoolOptions options)

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

    - #### client

          public static SqlClient client(Vertx vertx,
                                         PgConnectOptions database,
                                         PoolOptions options)

      Like `client()` with a specific instance.
      Parameters:
        `vertx` -
        `database` -
        `options` -
      Returns:

    - #### client

          public static SqlClient client(Vertx vertx,
                                         List<PgConnectOptions> databases,
                                         PoolOptions options)

      Like `client()` with a specific instance.
      Parameters:
        `vertx` -
        `databases` -
        `options` -
      Returns:

    - #### client

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

      Create a client backed by a connection pool to the PostgreSQL `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 PgPool 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 PgPool 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

    - #### newInstance

          public static PgPool newInstance(PgPool arg)

Copyright © 2022 Eclipse. All rights reserved.