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 Mutiny-ified interface using Vert.x codegen.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet>
call(String sql)
Calls the given SQLPROCEDURE
which returns the result from the procedure.io.vertx.ext.sql.ResultSet
callAndAwait(String sql)
Blocking variant ofcall(String)
.SQLOperations
callAndForget(String sql)
Variant ofcall(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet>
callWithParams(String sql, io.vertx.core.json.JsonArray params, io.vertx.core.json.JsonArray outputs)
Calls the given SQLPROCEDURE
which returns the result from the procedure.io.vertx.ext.sql.ResultSet
callWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params, io.vertx.core.json.JsonArray outputs)
Blocking variant ofcallWithParams(String,JsonArray,JsonArray)
.SQLOperations
callWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params, io.vertx.core.json.JsonArray outputs)
Variant ofcallWithParams(String,JsonArray,JsonArray)
that ignores the result of the operation.io.vertx.ext.sql.SQLOperations
getDelegate()
static SQLOperations
newInstance(io.vertx.ext.sql.SQLOperations arg)
io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet>
query(String sql)
Executes the given SQLSELECT
statement which returns the results of the query.io.vertx.ext.sql.ResultSet
queryAndAwait(String sql)
Blocking variant ofquery(String)
.SQLOperations
queryAndForget(String sql)
Variant ofquery(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>
querySingle(String sql)
Execute a one shot SQL statement that returns a single SQL row.io.vertx.core.json.JsonArray
querySingleAndAwait(String sql)
Blocking variant ofquerySingle(String)
.SQLOperations
querySingleAndForget(String sql)
Variant ofquerySingle(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray>
querySingleWithParams(String sql, io.vertx.core.json.JsonArray arguments)
Execute a one shot SQL statement with arguments that returns a single SQL row.io.vertx.core.json.JsonArray
querySingleWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray arguments)
Blocking variant ofquerySingleWithParams(String,JsonArray)
.SQLOperations
querySingleWithParamsAndForget(String sql, io.vertx.core.json.JsonArray arguments)
Variant ofquerySingleWithParams(String,JsonArray)
that ignores the result of the operation.io.smallrye.mutiny.Uni<SQLRowStream>
queryStream(String sql)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.SQLRowStream
queryStreamAndAwait(String sql)
Blocking variant ofqueryStream(String)
.SQLOperations
queryStreamAndForget(String sql)
Variant ofqueryStream(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<SQLRowStream>
queryStreamWithParams(String sql, io.vertx.core.json.JsonArray params)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.SQLRowStream
queryStreamWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params)
Blocking variant ofqueryStreamWithParams(String,JsonArray)
.SQLOperations
queryStreamWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params)
Variant ofqueryStreamWithParams(String,JsonArray)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet>
queryWithParams(String sql, io.vertx.core.json.JsonArray params)
Executes the given SQLSELECT
prepared statement which returns the results of the query.io.vertx.ext.sql.ResultSet
queryWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params)
Blocking variant ofqueryWithParams(String,JsonArray)
.SQLOperations
queryWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params)
Variant ofqueryWithParams(String,JsonArray)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.ext.sql.UpdateResult>
update(String sql)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.io.vertx.ext.sql.UpdateResult
updateAndAwait(String sql)
Blocking variant ofupdate(String)
.SQLOperations
updateAndForget(String sql)
Variant ofupdate(String)
that ignores the result of the operation.io.smallrye.mutiny.Uni<io.vertx.ext.sql.UpdateResult>
updateWithParams(String sql, io.vertx.core.json.JsonArray params)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parametersio.vertx.ext.sql.UpdateResult
updateWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params)
Blocking variant ofupdateWithParams(String,JsonArray)
.SQLOperations
updateWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params)
Variant ofupdateWithParams(String,JsonArray)
that ignores the result of the operation.
-
-
-
Method Detail
-
getDelegate
io.vertx.ext.sql.SQLOperations getDelegate()
-
query
io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> query(String sql)
Executes the given SQLSELECT
statement which returns the results of the query.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryAndAwait
io.vertx.ext.sql.ResultSet queryAndAwait(String sql)
Blocking variant ofquery(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the ResultSet instance produced by the operation.
-
queryAndForget
SQLOperations queryAndForget(String sql)
Variant ofquery(String)
that ignores the result of the operation.This method subscribes on the result of
query(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromquery(String)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the instance of SQLOperations to chain method calls.
-
queryWithParams
io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> queryWithParams(String sql, io.vertx.core.json.JsonArray params)
Executes the given SQLSELECT
prepared statement which returns the results of the query.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryWithParamsAndAwait
io.vertx.ext.sql.ResultSet queryWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params)
Blocking variant ofqueryWithParams(String,JsonArray)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
- the ResultSet instance produced by the operation.
-
queryWithParamsAndForget
SQLOperations queryWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params)
Variant ofqueryWithParams(String,JsonArray)
that ignores the result of the operation.This method subscribes on the result of
queryWithParams(String,JsonArray)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueryWithParams(String,JsonArray)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
- the instance of SQLOperations to chain method calls.
-
queryStream
io.smallrye.mutiny.Uni<SQLRowStream> queryStream(String sql)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryStreamAndAwait
SQLRowStream queryStreamAndAwait(String sql)
Blocking variant ofqueryStream(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the SQLRowStream instance produced by the operation.
-
queryStreamAndForget
SQLOperations queryStreamAndForget(String sql)
Variant ofqueryStream(String)
that ignores the result of the operation.This method subscribes on the result of
queryStream(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueryStream(String)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the instance of SQLOperations to chain method calls.
-
queryStreamWithParams
io.smallrye.mutiny.Uni<SQLRowStream> queryStreamWithParams(String sql, io.vertx.core.json.JsonArray params)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryStreamWithParamsAndAwait
SQLRowStream queryStreamWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params)
Blocking variant ofqueryStreamWithParams(String,JsonArray)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
- the SQLRowStream instance produced by the operation.
-
queryStreamWithParamsAndForget
SQLOperations queryStreamWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params)
Variant ofqueryStreamWithParams(String,JsonArray)
that ignores the result of the operation.This method subscribes on the result of
queryStreamWithParams(String,JsonArray)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueryStreamWithParams(String,JsonArray)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
- the instance of SQLOperations to chain method calls.
-
querySingle
io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray> 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.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the statement to execute- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
querySingleAndAwait
io.vertx.core.json.JsonArray querySingleAndAwait(String sql)
Blocking variant ofquerySingle(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the statement to execute- Returns:
- the JsonArray instance produced by the operation.
-
querySingleAndForget
SQLOperations querySingleAndForget(String sql)
Variant ofquerySingle(String)
that ignores the result of the operation.This method subscribes on the result of
querySingle(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromquerySingle(String)
but you don't need to compose it with other operations.- Parameters:
sql
- the statement to execute- Returns:
- the instance of SQLOperations to chain method calls.
-
querySingleWithParams
io.smallrye.mutiny.Uni<io.vertx.core.json.JsonArray> querySingleWithParams(String sql, io.vertx.core.json.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.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the statement to executearguments
- the arguments- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
querySingleWithParamsAndAwait
io.vertx.core.json.JsonArray querySingleWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray arguments)
Blocking variant ofquerySingleWithParams(String,JsonArray)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the statement to executearguments
- the arguments- Returns:
- the JsonArray instance produced by the operation.
-
querySingleWithParamsAndForget
SQLOperations querySingleWithParamsAndForget(String sql, io.vertx.core.json.JsonArray arguments)
Variant ofquerySingleWithParams(String,JsonArray)
that ignores the result of the operation.This method subscribes on the result of
querySingleWithParams(String,JsonArray)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromquerySingleWithParams(String,JsonArray)
but you don't need to compose it with other operations.- Parameters:
sql
- the statement to executearguments
- the arguments- Returns:
- the instance of SQLOperations to chain method calls.
-
update
io.smallrye.mutiny.Uni<io.vertx.ext.sql.UpdateResult> update(String sql)
Executes the given SQL statement which may be anINSERT
,UPDATE
, orDELETE
statement.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
updateAndAwait
io.vertx.ext.sql.UpdateResult updateAndAwait(String sql)
Blocking variant ofupdate(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
- Returns:
- the UpdateResult instance produced by the operation.
-
updateAndForget
SQLOperations updateAndForget(String sql)
Variant ofupdate(String)
that ignores the result of the operation.This method subscribes on the result of
update(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdate(String)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
- Returns:
- the instance of SQLOperations to chain method calls.
-
updateWithParams
io.smallrye.mutiny.Uni<io.vertx.ext.sql.UpdateResult> updateWithParams(String sql, io.vertx.core.json.JsonArray params)
Executes the given prepared statement which may be anINSERT
,UPDATE
, orDELETE
statement with the given parametersUnlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
params
- these are the parameters to fill the statement.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
updateWithParamsAndAwait
io.vertx.ext.sql.UpdateResult updateWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params)
Blocking variant ofupdateWithParams(String,JsonArray)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
params
- these are the parameters to fill the statement.- Returns:
- the UpdateResult instance produced by the operation.
-
updateWithParamsAndForget
SQLOperations updateWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params)
Variant ofupdateWithParams(String,JsonArray)
that ignores the result of the operation.This method subscribes on the result of
updateWithParams(String,JsonArray)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromupdateWithParams(String,JsonArray)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
params
- these are the parameters to fill the statement.- Returns:
- the instance of SQLOperations to chain method calls.
-
call
io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> call(String sql)
Calls the given SQLPROCEDURE
which returns the result from the procedure.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
callAndAwait
io.vertx.ext.sql.ResultSet callAndAwait(String sql)
Blocking variant ofcall(String)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.- Returns:
- the ResultSet instance produced by the operation.
-
callAndForget
SQLOperations callAndForget(String sql)
Variant ofcall(String)
that ignores the result of the operation.This method subscribes on the result of
call(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcall(String)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.- Returns:
- the instance of SQLOperations to chain method calls.
-
callWithParams
io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> callWithParams(String sql, io.vertx.core.json.JsonArray params, io.vertx.core.json.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"]
Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- 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:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
callWithParamsAndAwait
io.vertx.ext.sql.ResultSet callWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray params, io.vertx.core.json.JsonArray outputs)
Blocking variant ofcallWithParams(String,JsonArray,JsonArray)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- 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:
- the ResultSet instance produced by the operation.
-
callWithParamsAndForget
SQLOperations callWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params, io.vertx.core.json.JsonArray outputs)
Variant ofcallWithParams(String,JsonArray,JsonArray)
that ignores the result of the operation.This method subscribes on the result of
callWithParams(String,JsonArray,JsonArray)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromcallWithParams(String,JsonArray,JsonArray)
but you don't need to compose it with other operations.- 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:
- the instance of SQLOperations to chain method calls.
-
newInstance
static SQLOperations newInstance(io.vertx.ext.sql.SQLOperations arg)
-
-