Class SQLClient
- java.lang.Object
-
- io.vertx.mutiny.ext.sql.SQLClient
-
- All Implemented Interfaces:
SQLOperations
- Direct Known Subclasses:
JDBCClient
public class SQLClient extends Object implements SQLOperations
A common asynchronous client interface for interacting with SQL compliant database NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<SQLClient>
__TYPE_ARG
-
Method Summary
All Methods Static Methods Instance Methods Concrete 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)
.SQLClient
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)
.SQLClient
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.smallrye.mutiny.Uni<Void>
close()
Close the client and release all resources.Void
closeAndAwait()
Blocking variant ofclose()
.void
closeAndForget()
Variant ofclose()
that ignores the result of the operation.boolean
equals(Object o)
io.smallrye.mutiny.Uni<SQLConnection>
getConnection()
Returns a connection that can be used to perform SQL operations on.SQLConnection
getConnectionAndAwait()
Blocking variant ofgetConnection()
.SQLClient
getConnectionAndForget()
Variant ofgetConnection()
that ignores the result of the operation.io.vertx.ext.sql.SQLClient
getDelegate()
int
hashCode()
static SQLClient
newInstance(io.vertx.ext.sql.SQLClient arg)
io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet>
query(String sql)
Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL statement and returns it back after the execution.io.vertx.ext.sql.ResultSet
queryAndAwait(String sql)
Blocking variant ofquery(String)
.SQLClient
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 ofSQLOperations.querySingle(String)
.SQLOperations
querySingleAndForget(String sql)
Variant ofSQLOperations.querySingle(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 ofSQLOperations.querySingleWithParams(String,JsonArray)
.SQLOperations
querySingleWithParamsAndForget(String sql, io.vertx.core.json.JsonArray arguments)
Variant ofSQLOperations.querySingleWithParams(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)
.SQLClient
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)
.SQLClient
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 arguments)
Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL prepared statement and returns it back after the execution.io.vertx.ext.sql.ResultSet
queryWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray arguments)
Blocking variant ofqueryWithParams(String,JsonArray)
.SQLClient
queryWithParamsAndForget(String sql, io.vertx.core.json.JsonArray arguments)
Variant ofqueryWithParams(String,JsonArray)
that ignores the result of the operation.String
toString()
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)
.SQLClient
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)
.SQLClient
updateWithParamsAndForget(String sql, io.vertx.core.json.JsonArray params)
Variant ofupdateWithParams(String,JsonArray)
that ignores the result of the operation.
-
-
-
Constructor Detail
-
SQLClient
public SQLClient(io.vertx.ext.sql.SQLClient delegate)
-
SQLClient
public SQLClient(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.sql.SQLClient getDelegate()
- Specified by:
getDelegate
in interfaceSQLOperations
-
querySingle
@CheckReturnValue public 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.- Specified by:
querySingle
in interfaceSQLOperations
- 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
public io.vertx.core.json.JsonArray querySingleAndAwait(String sql)
Blocking variant ofSQLOperations.querySingle(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).
- Specified by:
querySingleAndAwait
in interfaceSQLOperations
- Parameters:
sql
- the statement to execute- Returns:
- the JsonArray instance produced by the operation.
-
querySingleAndForget
public SQLOperations querySingleAndForget(String sql)
Variant ofSQLOperations.querySingle(String)
that ignores the result of the operation.This method subscribes on the result of
SQLOperations.querySingle(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromSQLOperations.querySingle(String)
but you don't need to compose it with other operations.- Specified by:
querySingleAndForget
in interfaceSQLOperations
- Parameters:
sql
- the statement to execute- Returns:
- the instance of SQLOperations to chain method calls.
-
querySingleWithParams
@CheckReturnValue public 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.- Specified by:
querySingleWithParams
in interfaceSQLOperations
- 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
public io.vertx.core.json.JsonArray querySingleWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray arguments)
Blocking variant ofSQLOperations.querySingleWithParams(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).
- Specified by:
querySingleWithParamsAndAwait
in interfaceSQLOperations
- Parameters:
sql
- the statement to executearguments
- the arguments- Returns:
- the JsonArray instance produced by the operation.
-
querySingleWithParamsAndForget
public SQLOperations querySingleWithParamsAndForget(String sql, io.vertx.core.json.JsonArray arguments)
Variant ofSQLOperations.querySingleWithParams(String,JsonArray)
that ignores the result of the operation.This method subscribes on the result of
SQLOperations.querySingleWithParams(String,JsonArray)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromSQLOperations.querySingleWithParams(String,JsonArray)
but you don't need to compose it with other operations.- Specified by:
querySingleWithParamsAndForget
in interfaceSQLOperations
- Parameters:
sql
- the statement to executearguments
- the arguments- Returns:
- the instance of SQLOperations to chain method calls.
-
getConnection
@CheckReturnValue public io.smallrye.mutiny.Uni<SQLConnection> getConnection()
Returns a connection that can be used to perform SQL operations on. It's important to remember to close the connection when you are done, so it is returned to the pool.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
getConnectionAndAwait
public SQLConnection getConnectionAndAwait()
Blocking variant ofgetConnection()
.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).
- Returns:
- the SQLConnection instance produced by the operation.
-
getConnectionAndForget
public SQLClient getConnectionAndForget()
Variant ofgetConnection()
that ignores the result of the operation.This method subscribes on the result of
getConnection()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromgetConnection()
but you don't need to compose it with other operations.- Returns:
- the instance of SQLClient to chain method calls.
-
close
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
Close the client and release all resources. Call the handler when close is complete.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
public Void closeAndAwait()
Blocking variant ofclose()
.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).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public void closeAndForget()
-
query
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> query(String sql)
Execute a single SQL statement, this method acquires a connection from the the pool and executes the SQL statement and returns it back after the execution.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
query
in interfaceSQLOperations
- Parameters:
sql
- the statement to execute- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryAndAwait
public 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).
- Specified by:
queryAndAwait
in interfaceSQLOperations
- Parameters:
sql
- the statement to execute- Returns:
- the ResultSet instance produced by the operation.
-
queryAndForget
public SQLClient 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.- Specified by:
queryAndForget
in interfaceSQLOperations
- Parameters:
sql
- the statement to execute- Returns:
- the instance of SQLClient to chain method calls.
-
queryStream
@CheckReturnValue public 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.- Specified by:
queryStream
in interfaceSQLOperations
- 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
public 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).
- Specified by:
queryStreamAndAwait
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the SQLRowStream instance produced by the operation.
-
queryStreamAndForget
public SQLClient 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.- Specified by:
queryStreamAndForget
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the instance of SQLClient to chain method calls.
-
queryStreamWithParams
@CheckReturnValue public 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.- Specified by:
queryStreamWithParams
in interfaceSQLOperations
- 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
public 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).
- Specified by:
queryStreamWithParamsAndAwait
in interfaceSQLOperations
- 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
public SQLClient 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.- Specified by:
queryStreamWithParamsAndForget
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.params
- these are the parameters to fill the statement.- Returns:
- the instance of SQLClient to chain method calls.
-
queryWithParams
@CheckReturnValue public io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> queryWithParams(String sql, io.vertx.core.json.JsonArray arguments)
Execute a single SQL prepared statement, this method acquires a connection from the the pool and executes the SQL prepared statement and returns it back after the execution.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
queryWithParams
in interfaceSQLOperations
- Parameters:
sql
- the statement to executearguments
- the arguments to the statement- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryWithParamsAndAwait
public io.vertx.ext.sql.ResultSet queryWithParamsAndAwait(String sql, io.vertx.core.json.JsonArray arguments)
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).
- Specified by:
queryWithParamsAndAwait
in interfaceSQLOperations
- Parameters:
sql
- the statement to executearguments
- the arguments to the statement- Returns:
- the ResultSet instance produced by the operation.
-
queryWithParamsAndForget
public SQLClient queryWithParamsAndForget(String sql, io.vertx.core.json.JsonArray arguments)
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.- Specified by:
queryWithParamsAndForget
in interfaceSQLOperations
- Parameters:
sql
- the statement to executearguments
- the arguments to the statement- Returns:
- the instance of SQLClient to chain method calls.
-
update
@CheckReturnValue public 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.- Specified by:
update
in interfaceSQLOperations
- 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
public 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).
- Specified by:
updateAndAwait
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
- Returns:
- the UpdateResult instance produced by the operation.
-
updateAndForget
public SQLClient 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.- Specified by:
updateAndForget
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
- Returns:
- the instance of SQLClient to chain method calls.
-
updateWithParams
@CheckReturnValue public 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.- Specified by:
updateWithParams
in interfaceSQLOperations
- 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
public 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).
- Specified by:
updateWithParamsAndAwait
in interfaceSQLOperations
- 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
public SQLClient 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.- Specified by:
updateWithParamsAndForget
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For exampleINSERT INTO table ...
params
- these are the parameters to fill the statement.- Returns:
- the instance of SQLClient to chain method calls.
-
call
@CheckReturnValue public 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.- Specified by:
call
in interfaceSQLOperations
- 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
public 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).
- Specified by:
callAndAwait
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.- Returns:
- the ResultSet instance produced by the operation.
-
callAndForget
public SQLClient 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.- Specified by:
callAndForget
in interfaceSQLOperations
- Parameters:
sql
- the SQL to execute. For example{call getEmpName}
.- Returns:
- the instance of SQLClient to chain method calls.
-
callWithParams
@CheckReturnValue public 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.- Specified by:
callWithParams
in interfaceSQLOperations
- 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
public 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).
- Specified by:
callWithParamsAndAwait
in interfaceSQLOperations
- 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
public SQLClient 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.- Specified by:
callWithParamsAndForget
in interfaceSQLOperations
- 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 SQLClient to chain method calls.
-
newInstance
public static SQLClient newInstance(io.vertx.ext.sql.SQLClient arg)
-
-