Modifier and Type | Field and Description |
---|---|
static TypeArg<JDBCClient> |
__TYPE_ARG |
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.
|
rx.Observable<SQLConnection> |
getConnectionObservable()
Deprecated.
use
rxGetConnection() instead |
JDBCClient |
getDelegate() |
static JDBCClient |
newInstance(JDBCClient arg) |
rx.Single<SQLConnection> |
rxGetConnection()
Returns a connection that can be used to perform SQL operations on.
|
public static final TypeArg<JDBCClient> __TYPE_ARG
public JDBCClient(JDBCClient delegate)
public JDBCClient 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.@Deprecated public rx.Observable<SQLConnection> getConnectionObservable()
rxGetConnection()
insteadpublic rx.Single<SQLConnection> rxGetConnection()
public void close()
public static JDBCClient newInstance(JDBCClient arg)
Copyright © 2017. All rights reserved.