io.vertx.pgclient

## Interface PgPool

- All Superinterfaces:
    Pool, SqlClient

      public interface PgPool
      extends Pool

  A pool of PostgreSQL connections.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static PgPool` | `pool()` Like `pool(PoolOptions)` with a default `poolOptions`.
    `static PgPool` | `pool(PgConnectOptions connectOptions, PoolOptions poolOptions)` Create a connection pool to the database configured with the given `connectOptions` and `poolOptions`.
    `static PgPool` | `pool(PoolOptions poolOptions)` Like `pool(PgConnectOptions, PoolOptions)` with `connectOptions` build from the environment variables.
    `static PgPool` | `pool(String connectionUri)` Like `pool(String, PoolOptions)` with a default `poolOptions`.
    `static PgPool` | `pool(String connectionUri, PoolOptions poolOptions)` Like `pool(PgConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.
    `static PgPool` | `pool(Vertx vertx, PgConnectOptions connectOptions, PoolOptions poolOptions)` Like `pool(PgConnectOptions, PoolOptions)` with a specific `Vertx` instance.
    `static PgPool` | `pool(Vertx vertx, PoolOptions poolOptions)` Like `pool(Vertx, PgConnectOptions, PoolOptions)` with `connectOptions` build from the environment variables.
    `static PgPool` | `pool(Vertx vertx, String connectionUri)` Like `pool(Vertx, String,PoolOptions)` with a default `poolOptions`.
    `static PgPool` | `pool(Vertx vertx, String connectionUri, PoolOptions poolOptions)` Like `pool(Vertx, PgConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.
    `<R> PgPool` | `preparedBatch(String sql, List<Tuple> batch, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Prepare and execute a createBatch.
    `PgPool` | `preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a createBatch.
    `<R> PgPool` | `preparedQuery(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Prepare and execute a query.
    `PgPool` | `preparedQuery(String sql, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a query.
    `<R> PgPool` | `preparedQuery(String sql, Tuple arguments, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Prepare and execute a query.
    `PgPool` | `preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a query.
    `<R> PgPool` | `query(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Execute a simple query.
    `PgPool` | `query(String sql, Handler<AsyncResult<RowSet<Row>>> handler)` Execute a simple query.

    - ### Methods inherited from interface io.vertx.sqlclient.Pool

      `begin, close, getConnection`

- - ### Method Detail

    - #### pool

          static PgPool pool()

      Like `pool(PoolOptions)` with a default `poolOptions`.

    - #### pool

          static PgPool pool(PoolOptions poolOptions)

      Like `pool(PgConnectOptions, PoolOptions)` with `connectOptions` build from the environment variables.

    - #### pool

          static PgPool pool(String connectionUri)

      Like `pool(String, PoolOptions)` with a default `poolOptions`.

    - #### pool

          static PgPool pool(String connectionUri,
                             PoolOptions poolOptions)

      Like `pool(PgConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.

    - #### pool

          static PgPool pool(Vertx vertx,
                             String connectionUri)

      Like `pool(Vertx, String,PoolOptions)` with a default `poolOptions`.

    - #### pool

          static PgPool pool(Vertx vertx,
                             PoolOptions poolOptions)

      Like `pool(Vertx, PgConnectOptions, PoolOptions)` with `connectOptions` build from the environment variables.

    - #### pool

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

      Like `pool(Vertx, PgConnectOptions, PoolOptions)` with `connectOptions` build from `connectionUri`.

    - #### pool

          static PgPool pool(PgConnectOptions connectOptions,
                             PoolOptions poolOptions)

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

    - #### pool

          static PgPool pool(Vertx vertx,
                             PgConnectOptions connectOptions,
                             PoolOptions poolOptions)

      Like `pool(PgConnectOptions, PoolOptions)` with a specific `Vertx` instance.

    - #### preparedQuery

          PgPool preparedQuery(String sql,
                               Handler<AsyncResult<RowSet<Row>>> handler)

      Description copied from interface: `SqlClient`
      Prepare and execute a query.
      Specified by:
        `preparedQuery` in interface `Pool`
      Specified by:
        `preparedQuery` in interface `SqlClient`
      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

    - #### preparedQuery

          <R> PgPool preparedQuery(String sql,
                                   java.util.stream.Collector<Row,?,R> collector,
                                   Handler<AsyncResult<SqlResult<R>>> handler)

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

    - #### query

          PgPool query(String sql,
                       Handler<AsyncResult<RowSet<Row>>> handler)

      Description copied from interface: `SqlClient`
      Execute a simple query.
      Specified by:
        `query` in interface `Pool`
      Specified by:
        `query` in interface `SqlClient`
      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

    - #### query

          <R> PgPool query(String sql,
                           java.util.stream.Collector<Row,?,R> collector,
                           Handler<AsyncResult<SqlResult<R>>> handler)

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

    - #### preparedQuery

          PgPool preparedQuery(String sql,
                               Tuple arguments,
                               Handler<AsyncResult<RowSet<Row>>> handler)

      Description copied from interface: `SqlClient`
      Prepare and execute a query.
      Specified by:
        `preparedQuery` in interface `Pool`
      Specified by:
        `preparedQuery` in interface `SqlClient`
      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

    - #### preparedQuery

          <R> PgPool preparedQuery(String sql,
                                   Tuple arguments,
                                   java.util.stream.Collector<Row,?,R> collector,
                                   Handler<AsyncResult<SqlResult<R>>> handler)

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

    - #### preparedBatch

          PgPool preparedBatch(String sql,
                               List<Tuple> batch,
                               Handler<AsyncResult<RowSet<Row>>> handler)

      Description copied from interface: `SqlClient`
      Prepare and execute a createBatch.
      Specified by:
        `preparedBatch` in interface `Pool`
      Specified by:
        `preparedBatch` in interface `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
        `batch` - the batch of tuples
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedBatch

          <R> PgPool preparedBatch(String sql,
                                   List<Tuple> batch,
                                   java.util.stream.Collector<Row,?,R> collector,
                                   Handler<AsyncResult<SqlResult<R>>> handler)

      Description copied from interface: `SqlClient`
      Prepare and execute a createBatch.
      Specified by:
        `preparedBatch` in interface `Pool`
      Specified by:
        `preparedBatch` in interface `SqlClient`
      Parameters:
        `sql` - the prepared query SQL
        `batch` - the batch of tuples
        `collector` - the collector
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

Copyright © 2019 Eclipse. All rights reserved.