An asynchronous client interface for interacting with a JDBC compliant database
Constructor and description |
---|
JDBCClient
(java.lang.Object delegate) |
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() |
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() |
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.