Constructor and Description |
---|
JDBCClient(JDBCClient delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the client
|
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.rxjava.core.Vertx, io.vertx.core.json.JsonObject, java.lang.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
|
JDBCClient |
getConnection(Handler<AsyncResult<SQLConnection>> handler)
Returns a connection that can be used to perform SQL operations on.
|
Observable<SQLConnection> |
getConnectionObservable()
Returns a connection that can be used to perform SQL operations on.
|
Object |
getDelegate() |
static JDBCClient |
newInstance(JDBCClient arg) |
public JDBCClient(JDBCClient delegate)
public Object getDelegate()
public static JDBCClient createNonShared(Vertx vertx, JsonObject config)
vertx
- the Vert.x instanceconfig
- the configurationpublic static JDBCClient createShared(Vertx vertx, JsonObject config, String dataSourceName)
vertx
- the Vert.x instanceconfig
- the configurationdataSourceName
- the data source namepublic static JDBCClient createShared(Vertx vertx, JsonObject config)
createShared(io.vertx.rxjava.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String)
but with the default data source namevertx
- the Vert.x instanceconfig
- the configurationpublic JDBCClient getConnection(Handler<AsyncResult<SQLConnection>> handler)
handler
- the handler which is called when the JdbcConnection
object is ready for use.public Observable<SQLConnection> getConnectionObservable()
public void close()
public static JDBCClient newInstance(JDBCClient arg)
Copyright © 2016. All rights reserved.