An asynchronous client interface for interacting with a JDBC compliant database
Constructor and description |
---|
JDBCClient
(Object delegate) |
Type | Name and description |
---|---|
void |
close() Close the client |
static JDBCClient |
createNonShared(Vertx vertx, Map<String, Object> config) Create a JDBC client which maintains its own data source. |
static JDBCClient |
createShared(Vertx vertx, Map<String, Object> config, 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, Map<String, Object> config) Like JDBCClient.createShared but with the default data source name |
JDBCClient |
getConnection(Handler<AsyncResult<SQLConnection>> handler) Returns a connection that can be used to perform SQL operations on. |
Object |
getDelegate() |
Close the client
Create a JDBC client which maintains its own data source.
vertx
- the Vert.x instanceconfig
- the configurationCreate a JDBC client which shares its data source with any other JDBC clients created with the same data source name
vertx
- the Vert.x instanceconfig
- the configurationdataSourceName
- the data source nameLike JDBCClient.createShared but with the default data source name
vertx
- the Vert.x instanceconfig
- the configurationReturns 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.
handler
- the handler which is called when the JdbcConnection
object is ready for use.io.vertx:vertx-jdbc-client:3.1.0