io.vertx.ext.jdbc

## Interface JDBCClient

- All Superinterfaces:
    SQLClient

      public interface JDBCClient
      extends SQLClient

  An asynchronous client interface for interacting with a JDBC compliant database
  Author:
    Nick Scavelli, Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_DS_NAME` The name of the default data source
    `static String` | `DEFAULT_PROVIDER_CLASS` The default data source provider is C3P0

  - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JDBCClient` | `create(Vertx vertx, DataSource dataSource)` Create a client using a pre-existing data source
    `static JDBCClient` | `createNonShared(Vertx vertx, JsonObject config)` Create a JDBC client which maintains its own data source.
    `static JDBCClient` | `createShared(Vertx vertx, JsonObject config)` Like `createShared(io.vertx.core.Vertx, JsonObject, String)` but with the default data source name
    `static JDBCClient` | `createShared(Vertx vertx, JsonObject config, String dataSourceName)` Create a JDBC client which shares its data source with any other JDBC clients created with the same data source name

    - ### Methods inherited from interface io.vertx.ext.sql.SQLClient

      `close, close, getConnection`

- - ### Field Detail

    - #### DEFAULT_PROVIDER_CLASS

          static final String DEFAULT_PROVIDER_CLASS

      The default data source provider is C3P0
      See Also:
        Constant Field Values

    - #### DEFAULT_DS_NAME

          static final String DEFAULT_DS_NAME

      The name of the default data source
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### createNonShared

          static JDBCClient createNonShared(Vertx vertx,
                                            JsonObject config)

      Create a JDBC client which maintains its own data source.
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
      Returns:
        the client

    - #### createShared

          static JDBCClient createShared(Vertx vertx,
                                         JsonObject config,
                                         String dataSourceName)

      Create a JDBC client which shares its data source with any other JDBC clients created with the same data source name
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
        `dataSourceName` - the data source name
      Returns:
        the client

    - #### createShared

          static JDBCClient createShared(Vertx vertx,
                                         JsonObject config)

      Like `createShared(io.vertx.core.Vertx, JsonObject, String)` but with the default data source name
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
      Returns:
        the client

    - #### create

          static JDBCClient create(Vertx vertx,
                                   DataSource dataSource)

      Create a client using a pre-existing data source
      Parameters:
        `vertx` - the Vert.x instance
        `dataSource` - the datasource
      Returns:
        the client

Copyright © 2017. All rights reserved.