Package io.vertx.reactivex.ext.sql
Interface SQLOperations
-
- All Known Implementing Classes:
JDBCClient
,SQLClient
,SQLConnection
public interface SQLOperations
Represents a SQL query interface to a database NOTE: This class has been automatically generated from theoriginal
non RX-ified interface using Vert.x codegen.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description SQLOperations
call(String sql)
Calls the given SQLPROCEDURE
which returns the result from the procedure.SQLOperations
call(String sql, Handler<AsyncResult<ResultSet>> resultHandler)
Calls the given SQLPROCEDURE
which returns the result from the procedure.SQLOperations
callWithParams(String sql, JsonArray params, JsonArray outputs)
Calls the given SQLPROCEDURE
which returns the result from the procedure.SQLOperations
callWithParams(String sql, JsonArray params, JsonArray outputs, Handler<AsyncResult<ResultSet>> resultHandler)
Calls the given SQLPROCEDURE
which returns the result from the procedure.SQLOperations
getDelegate()
static SQLOperations
newInstance(SQLOperations arg)
SQLOperations
query(String sql)
Executes the given SQLSELECT
statement which returns the results of the query.SQLOperations
query(String sql, Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQLSELECT
statement which returns the results of the query.SQLOperations
querySingle(String sql)
Execute a one shot SQL statement that returns a single SQL row.SQLOperations
querySingle(String sql, Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement that returns a single SQL row.SQLOperations
querySingleWithParams(String sql, JsonArray arguments)
Execute a one shot SQL statement with arguments that returns a single SQL row.SQLOperations
querySingleWithParams(String sql, JsonArray arguments, Handler<AsyncResult<JsonArray>> handler)
Execute a one shot SQL statement with arguments that returns a single SQL row.SQLOperations
queryStream(String sql)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.SQLOperations
queryStream(String sql, Handler<AsyncResult<SQLRowStream>> handler)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.SQLOperations
queryStreamWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.SQLOperations
queryStreamWithParams(String sql, JsonArray params, Handler<AsyncResult<SQLRowStream>> handler)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.SQLOperations
queryWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
prepared statement which returns the results of the query.SQLOperations
queryWithParams(String sql, JsonArray params, Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQLSELECT
prepared statement which returns the results of the query.io.reactivex.Single<ResultSet>
rxCall(String sql)
Calls the given SQLPROCEDURE
which returns the result from the procedure.io.reactivex.Single<ResultSet>
rxCallWithParams(String sql, JsonArray params, JsonArray outputs)
Calls the given SQLPROCEDURE
which returns the result from the procedure.io.reactivex.Single<ResultSet>
rxQuery(String sql)
Executes the given SQLSELECT
statement which returns the results of the query.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.io.reactivex.Single<SQLRowStream>
rxQueryStream(String sql)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.io.reactivex.Single<SQLRowStream>
rxQueryStreamWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.io.reactivex.Single<ResultSet>
rxQueryWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
prepared statement which returns the results of the query.io.reactivex.Single<UpdateResult>
rxUpdate(String sql)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.io.reactivex.Single<UpdateResult>
rxUpdateWithParams(String sql, JsonArray params)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parametersSQLOperations
update(String sql)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.SQLOperations
update(String sql, Handler<AsyncResult<UpdateResult>> resultHandler)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.SQLOperations
updateWithParams(String sql, JsonArray params)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parametersSQLOperations
updateWithParams(String sql, JsonArray params, Handler<AsyncResult<UpdateResult>> resultHandler)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parameters
-
-
-
Method Detail
-
getDelegate
SQLOperations getDelegate()
-
query
SQLOperations query(String sql, Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQLSELECT
statement which returns the results of the query.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.resultHandler
- the handler which is called once the operation completes. It will return aResultSet
.- Returns:
-
query
SQLOperations query(String sql)
Executes the given SQLSELECT
statement which returns the results of the query.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
-
rxQuery
io.reactivex.Single<ResultSet> rxQuery(String sql)
Executes the given SQLSELECT
statement which returns the results of the query.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
-
queryWithParams
SQLOperations queryWithParams(String sql, JsonArray params, Handler<AsyncResult<ResultSet>> resultHandler)
Executes the given SQLSELECT
prepared statement which returns the results of the query.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.resultHandler
- the handler which is called once the operation completes. It will return aResultSet
.- Returns:
-
queryWithParams
SQLOperations queryWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
prepared statement which returns the results of the query.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
-
rxQueryWithParams
io.reactivex.Single<ResultSet> rxQueryWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
prepared statement which returns the results of the query.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
-
queryStream
SQLOperations queryStream(String sql, Handler<AsyncResult<SQLRowStream>> handler)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.handler
- the handler which is called once the operation completes. It will return aSQLRowStream
.- Returns:
-
queryStream
SQLOperations queryStream(String sql)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
-
rxQueryStream
io.reactivex.Single<SQLRowStream> rxQueryStream(String sql)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
-
queryStreamWithParams
SQLOperations queryStreamWithParams(String sql, JsonArray params, Handler<AsyncResult<SQLRowStream>> handler)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.handler
- the handler which is called once the operation completes. It will return aSQLRowStream
.- Returns:
-
queryStreamWithParams
SQLOperations queryStreamWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
-
rxQueryStreamWithParams
io.reactivex.Single<SQLRowStream> rxQueryStreamWithParams(String sql, JsonArray params)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
-
querySingle
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.- Parameters:
sql
- the statement to executehandler
- the result handler- Returns:
- self
-
querySingle
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.- Parameters:
sql
- the statement to execute- Returns:
- self
-
rxQuerySingle
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.- Parameters:
sql
- the statement to execute- Returns:
- self
-
querySingleWithParams
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.- Parameters:
sql
- the statement to executearguments
- the argumentshandler
- the result handler- Returns:
- self
-
querySingleWithParams
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.- Parameters:
sql
- the statement to executearguments
- the arguments- Returns:
- self
-
rxQuerySingleWithParams
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.- Parameters:
sql
- the statement to executearguments
- the arguments- Returns:
- self
-
update
SQLOperations update(String sql, Handler<AsyncResult<UpdateResult>> resultHandler)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
resultHandler
- the handler which is called once the operation completes.- Returns:
-
update
SQLOperations update(String sql)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
- Returns:
-
rxUpdate
io.reactivex.Single<UpdateResult> rxUpdate(String sql)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
- Returns:
-
updateWithParams
SQLOperations updateWithParams(String sql, JsonArray params, Handler<AsyncResult<UpdateResult>> resultHandler)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parameters- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
params
- these are the parameters to fill the statement.resultHandler
- the handler which is called once the operation completes.- Returns:
-
updateWithParams
SQLOperations updateWithParams(String sql, JsonArray params)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parameters- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
params
- these are the parameters to fill the statement.- Returns:
-
rxUpdateWithParams
io.reactivex.Single<UpdateResult> rxUpdateWithParams(String sql, JsonArray params)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parameters- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
params
- these are the parameters to fill the statement.- Returns:
-
call
SQLOperations call(String sql, Handler<AsyncResult<ResultSet>> resultHandler)
Calls the given SQLPROCEDURE
which returns the result from the procedure.- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.resultHandler
- the handler which is called once the operation completes. It will return aResultSet
.- Returns:
-
call
SQLOperations call(String sql)
Calls the given SQLPROCEDURE
which returns the result from the procedure.- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.- Returns:
-
rxCall
io.reactivex.Single<ResultSet> rxCall(String sql)
Calls the given SQLPROCEDURE
which returns the result from the procedure.- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.- Returns:
-
callWithParams
SQLOperations callWithParams(String sql, JsonArray params, JsonArray outputs, Handler<AsyncResult<ResultSet>> resultHandler)
Calls the given SQLPROCEDURE
which returns the result from the procedure. The index of params and outputs are important for both arrays, for example when dealing with a prodecure that takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:params = [VALUE1, VALUE2, null] outputs = [null, null, "VARCHAR"]
- Parameters:
sql
- the SQL to execute. For example{call getEmpName (?, ?)}
.params
- these are the parameters to fill the statement.outputs
- these are the outputs to fill the statement.resultHandler
- the handler which is called once the operation completes. It will return aResultSet
.- Returns:
-
callWithParams
SQLOperations callWithParams(String sql, JsonArray params, JsonArray outputs)
Calls the given SQLPROCEDURE
which returns the result from the procedure. The index of params and outputs are important for both arrays, for example when dealing with a prodecure that takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:params = [VALUE1, VALUE2, null] outputs = [null, null, "VARCHAR"]
- Parameters:
sql
- the SQL to execute. For example{call getEmpName (?, ?)}
.params
- these are the parameters to fill the statement.outputs
- these are the outputs to fill the statement.- Returns:
-
rxCallWithParams
io.reactivex.Single<ResultSet> rxCallWithParams(String sql, JsonArray params, JsonArray outputs)
Calls the given SQLPROCEDURE
which returns the result from the procedure. The index of params and outputs are important for both arrays, for example when dealing with a prodecure that takes the first 2 arguments as input values and the 3 arg as an output then the arrays should be like:params = [VALUE1, VALUE2, null] outputs = [null, null, "VARCHAR"]
- Parameters:
sql
- the SQL to execute. For example{call getEmpName (?, ?)}
.params
- these are the parameters to fill the statement.outputs
- these are the outputs to fill the statement.- Returns:
-
newInstance
static SQLOperations newInstance(SQLOperations arg)
-
-