Package: io.vertx.groovy.ext.jdbc

## [Groovy] Class JDBCClient

- io.vertx.groovy.ext.jdbc.JDBCClient

- An asynchronous client interface for interacting with a JDBC compliant database

- - ### Constructor Summary

    Constructors
    Constructor and description
    `JDBCClient (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `close()` Close the client
    `static JDBCClient` | `createNonShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config)` Create a JDBC client which maintains its own data source.
    `static JDBCClient` | `createShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config, java.lang.String dataSourceName)` Create a JDBC client which shares its data source with any other JDBC clients created with the same data source name
    `static JDBCClient` | `createShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config)` Like JDBCClient.createShared but with the default data source name
    `JDBCClient` | `getConnection(io.vertx.core.Handler<io.vertx.core.AsyncResult<SQLConnection>> handler)` Returns a connection that can be used to perform SQL operations on.
    `java.lang.Object` | `getDelegate()`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### JDBCClient(java.lang.Object delegate)

  - ### Method Detail

    - #### void close()

      Close the client

    - #### static JDBCClient createNonShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config)

      Create a JDBC client which maintains its own data source.

      Returns:
        the client
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration

    - #### static JDBCClient createShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config, java.lang.String dataSourceName)

      Create a JDBC client which shares its data source with any other JDBC clients created with the same data source name

      Returns:
        the client
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
        `dataSourceName` - the data source name

    - #### static JDBCClient createShared(Vertx vertx, java.util.Map<java.lang.String, java.lang.Object> config)

      Like JDBCClient.createShared but with the default data source name

      Returns:
        the client
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration

    - #### JDBCClient getConnection(io.vertx.core.Handler<io.vertx.core.AsyncResult<SQLConnection>> handler)

      Returns a connection that can be used to perform SQL operations on. It's important to remember to close the connection when you are done, so it is returned to the pool.

      Returns:
      Parameters:
        `handler` - the handler which is called when the `JdbcConnection` object is ready for use.

    - #### java.lang.Object getDelegate()