Package io.vertx.rxjava.jdbcclient
Class JDBCPool
- java.lang.Object
-
- io.vertx.rxjava.sqlclient.SqlClient
-
- io.vertx.rxjava.sqlclient.Pool
-
- io.vertx.rxjava.jdbcclient.JDBCPool
-
- All Implemented Interfaces:
RxDelegate
public class JDBCPool extends Pool implements RxDelegate
JDBCPool is the interface that allows using the Sql Client API with plain JDBC. NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<JDBCPool>
__TYPE_ARG
static Supplier<DataSourceProvider>
DEFAULT_DATA_SOURCE_PROVIDER
The default data source provider for this pool, loaded from JVM system properties with the key.static PropertyKind<Row>
GENERATED_KEYS
The property to be used to retrieve the generated keysstatic PropertyKind<Boolean>
OUTPUT
The property to be used to retrieve the output of the callable statement
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(Object o)
JDBCPool
getDelegate()
int
hashCode()
static JDBCPool
newInstance(JDBCPool arg)
static JDBCPool
pool(Vertx vertx, JsonObject config)
Deprecated.static JDBCPool
pool(Vertx vertx, DataSourceProvider dataSourceProvider)
Create a JDBC pool which maintains its own data source.static JDBCPool
pool(Vertx vertx, JDBCConnectOptions connectOptions, PoolOptions poolOptions)
Create a JDBC pool which maintains its own data source and the#DEFAULT_DATA_SOURCE_PROVIDER default data source provider
.static JDBCPool
pool(Vertx vertx, JDBCConnectOptions connectOptions, PoolOptions poolOptions, DataSourceProvider provider)
Create a JDBC pool which maintains its own data source, with the specified providerstatic JDBCPool
pool(Vertx vertx, DataSource dataSource)
Create a JDBC pool using a pre-initialized data source.static JDBCPool
pool(Vertx vertx, DataSource dataSource, JsonObject config)
Deprecated.String
toString()
-
Methods inherited from class io.vertx.rxjava.sqlclient.Pool
close, close, connectHandler, connectionProvider, getConnection, getConnection, newInstance, pool, pool, pool, preparedQuery, query, rxClose, rxGetConnection, rxWithConnection, rxWithTransaction, rxWithTransaction, size, withConnection, withConnection, withTransaction, withTransaction, withTransaction, withTransaction
-
Methods inherited from class io.vertx.rxjava.sqlclient.SqlClient
newInstance, preparedQuery
-
-
-
-
Field Detail
-
DEFAULT_DATA_SOURCE_PROVIDER
public static final Supplier<DataSourceProvider> DEFAULT_DATA_SOURCE_PROVIDER
The default data source provider for this pool, loaded from JVM system properties with the key. The value can be one of:- C3P0:
- Hikari:
- Agroal:
-
GENERATED_KEYS
public static final PropertyKind<Row> GENERATED_KEYS
The property to be used to retrieve the generated keys
-
OUTPUT
public static final PropertyKind<Boolean> OUTPUT
The property to be used to retrieve the output of the callable statement
-
-
Method Detail
-
getDelegate
public JDBCPool getDelegate()
- Specified by:
getDelegate
in interfaceRxDelegate
- Overrides:
getDelegate
in classPool
-
pool
public static JDBCPool pool(Vertx vertx, JDBCConnectOptions connectOptions, PoolOptions poolOptions)
Create a JDBC pool which maintains its own data source and the#DEFAULT_DATA_SOURCE_PROVIDER default data source provider
.- Parameters:
vertx
- the Vert.x instanceconnectOptions
- the options to configure the connectionpoolOptions
- the connection pool options- Returns:
- the client
-
pool
@Deprecated public static JDBCPool pool(Vertx vertx, JsonObject config)
Deprecated.Create a JDBC pool which maintains its own data source.- Parameters:
vertx
- the Vert.x instanceconfig
- the options to configure the client using the same format asJDBCClient
- Returns:
- the client
-
pool
public static JDBCPool pool(Vertx vertx, JDBCConnectOptions connectOptions, PoolOptions poolOptions, DataSourceProvider provider)
Create a JDBC pool which maintains its own data source, with the specified provider- Parameters:
vertx
- the Vert.x instanceconnectOptions
- the options to configure the connectionpoolOptions
- the connection pool optionsprovider
- the data source provider- Returns:
- the client
-
pool
public static JDBCPool pool(Vertx vertx, DataSourceProvider dataSourceProvider)
Create a JDBC pool which maintains its own data source.- Parameters:
vertx
- the Vert.x instancedataSourceProvider
- the options to configure the client using the same format asJDBCClient
- Returns:
- the client
-
pool
public static JDBCPool pool(Vertx vertx, DataSource dataSource)
Create a JDBC pool using a pre-initialized data source.- Parameters:
vertx
- the Vert.x instancedataSource
- a pre-initialized data source- Returns:
- the client
-
pool
@Deprecated public static JDBCPool pool(Vertx vertx, DataSource dataSource, JsonObject config)
Deprecated.Create a JDBC pool using a pre-initialized data source. The config expects that at least the following properties are set:url
- the connection stringuser
- the connection user namedatabase
- the database namemaxPoolSize
- the max allowed number of connections in the pool
- Parameters:
vertx
- the Vert.x instancedataSource
- a pre-initialized data sourceconfig
- the pool configuration- Returns:
- the client
-
-