io.vertx.jdbcclient

## Interface JDBCPool

- All Superinterfaces:
    Pool, SqlClient

      public interface JDBCPool
      extends Pool

  JDBCPool is the interface that allows using the Sql Client API with plain JDBC.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static PropertyKind<Row>` | `GENERATED_KEYS` The property to be used to retrieve the generated keys
    `static PropertyKind<Boolean>` | `OUTPUT` The property to be used to retrieve the output of the callable statement

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JDBCPool` | `pool(Vertx vertx, DataSource dataSource)` Create a JDBC pool using a pre-initialized data source.
    `static JDBCPool` | `pool(Vertx vertx, DataSource dataSource, JsonObject config)` Create a JDBC pool using a pre-initialized data source.
    `static JDBCPool` | `pool(Vertx vertx, DataSourceProvider dataSourceProvider)` Create a JDBC pool which maintains its own data source.
    `static JDBCPool` | `pool(Vertx vertx, JDBCConnectOptions connectOptions, PoolOptions poolOptions)` Create a JDBC pool which maintains its own data source.
    `static JDBCPool` | `pool(Vertx vertx, JsonObject config)` Create a JDBC pool which maintains its own data source.

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

      `close, connectHandler, connectionProvider, getConnection, getConnection, pool, pool, pool, preparedQuery, query, size, withConnection, withConnection, withTransaction, withTransaction, withTransaction, withTransaction`

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

      `close, preparedQuery`

- - ### Field Detail

    - #### GENERATED_KEYS

          static final PropertyKind<Row> GENERATED_KEYS

      The property to be used to retrieve the generated keys

    - #### OUTPUT

          static final PropertyKind<Boolean> OUTPUT

      The property to be used to retrieve the output of the callable statement

  - ### Method Detail

    - #### pool

          static JDBCPool pool(Vertx vertx,
                               JDBCConnectOptions connectOptions,
                               PoolOptions poolOptions)

      Create a JDBC pool which maintains its own data source.
      Parameters:
        `vertx` - the Vert.x instance
        `connectOptions` - the options to configure the connection
        `poolOptions` - the connection pool options
      Returns:
        the client

    - #### pool

          static JDBCPool pool(Vertx vertx,
                               JsonObject config)

      Create a JDBC pool which maintains its own data source.
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the options to configure the client using the same format as `JDBCClient`
      Returns:
        the client

    - #### pool

          static JDBCPool pool(Vertx vertx,
                               DataSourceProvider dataSourceProvider)

      Create a JDBC pool which maintains its own data source.
      Parameters:
        `vertx` - the Vert.x instance
        `dataSourceProvider` - the options to configure the client using the same format as `JDBCClient`
      Returns:
        the client
      Since:
        4.2.0

    - #### pool

          static JDBCPool pool(Vertx vertx,
                               DataSource dataSource)

      Create a JDBC pool using a pre-initialized data source.
      Parameters:
        `vertx` - the Vert.x instance
        `dataSource` - a pre-initialized data source
      Returns:
        the client
      Since:
        4.2.0

    - #### pool

          static JDBCPool pool(Vertx vertx,
                               DataSource dataSource,
                               JsonObject config)

      Create a JDBC pool using a pre-initialized data source. The config expects that at least the following properties are set:
      - `url` - the connection string
      - `user` - the connection user name
      - `database` - the database name
      - `maxPoolSize` - the max allowed number of connections in the pool
      Parameters:
        `vertx` - the Vert.x instance
        `dataSource` - a pre-initialized data source
        `config` - the pool configuration
      Returns:
        the client
      Since:
        4.2.0

Copyright © 2023 Eclipse. All rights reserved.