Package io.vertx.reactivex.ext.jdbc
Class JDBCClient
- java.lang.Object
-
- io.vertx.reactivex.ext.sql.SQLClient
-
- io.vertx.reactivex.ext.jdbc.JDBCClient
-
- All Implemented Interfaces:
SQLOperations
public class JDBCClient extends SQLClient
An asynchronous client interface for interacting with a JDBC compliant database NOTE: This class has been automatically generated from theoriginalnon RX-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<JDBCClient>__TYPE_ARGstatic StringDEFAULT_DS_NAMEThe name of the default data sourcestatic StringDEFAULT_PROVIDER_CLASSThe default data source provider is C3P0
-
Constructor Summary
Constructors Constructor Description JDBCClient(JDBCClient delegate)JDBCClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JDBCClientcreate(Vertx vertx, JsonObject config)Create a JDBC client which maintains its own data source.static JDBCClientcreateShared(Vertx vertx, JsonObject config)LikecreateShared(io.vertx.reactivex.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String)but with the default data source namestatic JDBCClientcreateShared(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 namebooleanequals(Object o)JDBCClientgetDelegate()inthashCode()static JDBCClientnewInstance(JDBCClient arg)SQLOperationsquerySingle(String sql)Execute a one shot SQL statement that returns a single SQL row.SQLOperationsquerySingle(String sql, Handler<AsyncResult<JsonArray>> handler)Execute a one shot SQL statement that returns a single SQL row.SQLOperationsquerySingleWithParams(String sql, JsonArray arguments)Execute a one shot SQL statement with arguments that returns a single SQL row.SQLOperationsquerySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)Execute a one shot SQL statement with arguments that returns a single SQL row.io.reactivex.Maybe<JsonArray>rxQuerySingle(String sql)Execute a one shot SQL statement that returns a single SQL row.io.reactivex.Maybe<JsonArray>rxQuerySingleWithParams(String sql, JsonArray arguments)Execute a one shot SQL statement with arguments that returns a single SQL row.StringtoString()-
Methods inherited from class io.vertx.reactivex.ext.sql.SQLClient
call, call, callWithParams, callWithParams, close, close, getConnection, getConnection, newInstance, query, query, queryStream, queryStream, queryStreamWithParams, queryStreamWithParams, queryWithParams, queryWithParams, rxCall, rxCallWithParams, rxClose, rxGetConnection, rxQuery, rxQueryStream, rxQueryStreamWithParams, rxQueryWithParams, rxUpdate, rxUpdateWithParams, update, update, updateWithParams, updateWithParams
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<JDBCClient> __TYPE_ARG
-
DEFAULT_PROVIDER_CLASS
public static final String DEFAULT_PROVIDER_CLASS
The default data source provider is C3P0- See Also:
- Constant Field Values
-
DEFAULT_DS_NAME
public static final String DEFAULT_DS_NAME
The name of the default data source- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JDBCClient
public JDBCClient(JDBCClient delegate)
-
JDBCClient
public JDBCClient(Object delegate)
-
-
Method Detail
-
getDelegate
public JDBCClient getDelegate()
- Specified by:
getDelegatein interfaceSQLOperations- Overrides:
getDelegatein classSQLClient
-
querySingle
public SQLOperations querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned.- Specified by:
querySinglein interfaceSQLOperations- Overrides:
querySinglein classSQLClient- Parameters:
sql- the statement to executehandler- the result handler- Returns:
- self
-
querySingle
public SQLOperations querySingle(String sql)
Execute a one shot SQL statement that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned.- Specified by:
querySinglein interfaceSQLOperations- Overrides:
querySinglein classSQLClient- Parameters:
sql- the statement to execute- Returns:
- self
-
rxQuerySingle
public io.reactivex.Maybe<JsonArray> rxQuerySingle(String sql)
Execute a one shot SQL statement that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned.- Specified by:
rxQuerySinglein interfaceSQLOperations- Overrides:
rxQuerySinglein classSQLClient- Parameters:
sql- the statement to execute- Returns:
- self
-
querySingleWithParams
public SQLOperations querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement with arguments that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned.- Specified by:
querySingleWithParamsin interfaceSQLOperations- Overrides:
querySingleWithParamsin classSQLClient- Parameters:
sql- the statement to executearguments- the argumentshandler- the result handler- Returns:
- self
-
querySingleWithParams
public SQLOperations querySingleWithParams(String sql, JsonArray arguments)
Execute a one shot SQL statement with arguments that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned.- Specified by:
querySingleWithParamsin interfaceSQLOperations- Overrides:
querySingleWithParamsin classSQLClient- Parameters:
sql- the statement to executearguments- the arguments- Returns:
- self
-
rxQuerySingleWithParams
public io.reactivex.Maybe<JsonArray> rxQuerySingleWithParams(String sql, JsonArray arguments)
Execute a one shot SQL statement with arguments that returns a single SQL row. This method will reduce the boilerplate code by getting a connection from the pool (this object) and return it back after the execution. Only the first result from the result set is returned.- Specified by:
rxQuerySingleWithParamsin interfaceSQLOperations- Overrides:
rxQuerySingleWithParamsin classSQLClient- Parameters:
sql- the statement to executearguments- the arguments- Returns:
- self
-
create
public static JDBCClient create(Vertx vertx, JsonObject config)
Create a JDBC client which maintains its own data source.- Parameters:
vertx- the Vert.x instanceconfig- the configuration- Returns:
- the client
-
createShared
public 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- Parameters:
vertx- the Vert.x instanceconfig- the configurationdataSourceName- the data source name- Returns:
- the client
-
createShared
public static JDBCClient createShared(Vertx vertx, JsonObject config)
LikecreateShared(io.vertx.reactivex.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String)but with the default data source name- Parameters:
vertx- the Vert.x instanceconfig- the configuration- Returns:
- the client
-
newInstance
public static JDBCClient newInstance(JDBCClient arg)
-
-