Class SQLConnection

  • All Implemented Interfaces:
    SQLOperations

    public class SQLConnection
    extends Object
    implements SQLOperations
    Represents a connection to a SQL database

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • SQLConnection

        public SQLConnection​(io.vertx.ext.sql.SQLConnection delegate)
      • SQLConnection

        public SQLConnection​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.ext.sql.SQLConnection getDelegate()
        Specified by:
        getDelegate in interface SQLOperations
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • querySingle

        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 interface SQLOperations
        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 of SQLOperations.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 interface SQLOperations
        Parameters:
        sql - the statement to execute
        Returns:
        the JsonArray instance produced by the operation.
      • querySingleWithParams

        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 interface SQLOperations
        Parameters:
        sql - the statement to execute
        arguments - 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 of SQLOperations.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 interface SQLOperations
        Parameters:
        sql - the statement to execute
        arguments - the arguments
        Returns:
        the JsonArray instance produced by the operation.
      • setOptions

        public SQLConnection setOptions​(io.vertx.ext.sql.SQLOptions options)
        Parameters:
        options - the options to modify the unwrapped connection.
        Returns:
        the instance of SQLConnection to chain method calls.
      • setAutoCommit

        public io.smallrye.mutiny.Uni<Void> setAutoCommit​(boolean autoCommit)
        Sets the auto commit flag for this connection. True by default.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        autoCommit - the autoCommit flag, true by default.
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • setAutoCommitAndAwait

        public Void setAutoCommitAndAwait​(boolean autoCommit)
        Blocking variant of setAutoCommit(boolean).

        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:
        autoCommit - the autoCommit flag, true by default.
        Returns:
        the Void instance produced by the operation.
      • setAutoCommitAndForget

        public SQLConnection setAutoCommitAndForget​(boolean autoCommit)
        Variant of setAutoCommit(boolean) that ignores the result of the operation.

        This method subscribes on the result of setAutoCommit(boolean), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from setAutoCommit(boolean) but you don't need to compose it with other operations.

        Parameters:
        autoCommit - the autoCommit flag, true by default.
        Returns:
        the instance of SQLConnection to chain method calls.
      • execute

        public io.smallrye.mutiny.Uni<Void> execute​(String sql)
        Executes the given SQL 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 example CREATE TABLE IF EXISTS table ...
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • executeAndAwait

        public Void executeAndAwait​(String sql)
        Blocking variant of execute(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 CREATE TABLE IF EXISTS table ...
        Returns:
        the Void instance produced by the operation.
      • executeAndForget

        public SQLConnection executeAndForget​(String sql)
        Variant of execute(String) that ignores the result of the operation.

        This method subscribes on the result of execute(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from execute(String) but you don't need to compose it with other operations.

        Parameters:
        sql - the SQL to execute. For example CREATE TABLE IF EXISTS table ...
        Returns:
        the instance of SQLConnection to chain method calls.
      • query

        public io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> query​(String sql)
        Executes the given SQL SELECT 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.

        Specified by:
        query in interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        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 of query(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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        Returns:
        the ResultSet instance produced by the operation.
      • queryAndForget

        public SQLConnection queryAndForget​(String sql)
        Variant of query(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 from query(String) but you don't need to compose it with other operations.

        Specified by:
        queryAndForget in interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        Returns:
        the instance of SQLConnection to chain method calls.
      • queryStream

        public io.smallrye.mutiny.Uni<SQLRowStream> queryStream​(String sql)
        Executes the given SQL SELECT 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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * 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 of queryStream(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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        Returns:
        the SQLRowStream instance produced by the operation.
      • queryStreamAndForget

        public SQLConnection queryStreamAndForget​(String sql)
        Variant of queryStream(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 from queryStream(String) but you don't need to compose it with other operations.

        Specified by:
        queryStreamAndForget in interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        Returns:
        the instance of SQLConnection to chain method calls.
      • queryWithParams

        public io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> queryWithParams​(String sql,
                                                                                  io.vertx.core.json.JsonArray params)
        Executes the given SQL SELECT 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.

        Specified by:
        queryWithParams in interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * 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

        public io.vertx.ext.sql.ResultSet queryWithParamsAndAwait​(String sql,
                                                                  io.vertx.core.json.JsonArray params)
        Blocking variant of queryWithParams(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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        params - these are the parameters to fill the statement.
        Returns:
        the ResultSet instance produced by the operation.
      • queryStreamWithParams

        public io.smallrye.mutiny.Uni<SQLRowStream> queryStreamWithParams​(String sql,
                                                                          io.vertx.core.json.JsonArray params)
        Executes the given SQL SELECT 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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * 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 of queryStreamWithParams(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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        params - these are the parameters to fill the statement.
        Returns:
        the SQLRowStream instance produced by the operation.
      • update

        public io.smallrye.mutiny.Uni<io.vertx.ext.sql.UpdateResult> update​(String sql)
        Executes the given SQL statement which may be an INSERT, UPDATE, or DELETE 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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example INSERT 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 of update(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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example INSERT INTO table ...
        Returns:
        the UpdateResult instance produced by the operation.
      • updateAndForget

        public SQLConnection updateAndForget​(String sql)
        Variant of update(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 from update(String) but you don't need to compose it with other operations.

        Specified by:
        updateAndForget in interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example INSERT INTO table ...
        Returns:
        the instance of SQLConnection to chain method calls.
      • updateWithParams

        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 an INSERT, UPDATE, or DELETE statement with the given parameters

        Unlike 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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example INSERT 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 of updateWithParams(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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example INSERT INTO table ...
        params - these are the parameters to fill the statement.
        Returns:
        the UpdateResult instance produced by the operation.
      • call

        public io.smallrye.mutiny.Uni<io.vertx.ext.sql.ResultSet> call​(String sql)
        Calls the given SQL PROCEDURE 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 interface SQLOperations
        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 of call(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 interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example {call getEmpName}.
        Returns:
        the ResultSet instance produced by the operation.
      • callAndForget

        public SQLConnection callAndForget​(String sql)
        Variant of call(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 from call(String) but you don't need to compose it with other operations.

        Specified by:
        callAndForget in interface SQLOperations
        Parameters:
        sql - the SQL to execute. For example {call getEmpName}.
        Returns:
        the instance of SQLConnection to chain method calls.
      • callWithParams

        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 SQL PROCEDURE 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 interface SQLOperations
        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 of callWithParams(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 interface SQLOperations
        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.
      • close

        public io.smallrye.mutiny.Uni<Void> close()
        Closes the connection. Important to always close the connection when you are done so it's 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.
      • closeAndAwait

        public Void closeAndAwait()
        Blocking variant of close().

        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()
        Variant of close() that ignores the result of the operation.

        This method subscribes on the result of close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from close() but you don't need to compose it with other operations.

      • commit

        public io.smallrye.mutiny.Uni<Void> commit()
        Commits all changes made since the previous commit/rollback.

        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.
      • commitAndAwait

        public Void commitAndAwait()
        Blocking variant of commit().

        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.
      • commitAndForget

        public SQLConnection commitAndForget()
        Variant of commit() that ignores the result of the operation.

        This method subscribes on the result of commit(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from commit() but you don't need to compose it with other operations.

        Returns:
        the instance of SQLConnection to chain method calls.
      • rollback

        public io.smallrye.mutiny.Uni<Void> rollback()
        Rolls back all changes made since the previous commit/rollback.

        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.
      • rollbackAndAwait

        public Void rollbackAndAwait()
        Blocking variant of rollback().

        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.
      • rollbackAndForget

        public SQLConnection rollbackAndForget()
        Variant of rollback() that ignores the result of the operation.

        This method subscribes on the result of rollback(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from rollback() but you don't need to compose it with other operations.

        Returns:
        the instance of SQLConnection to chain method calls.
      • setQueryTimeout

        @Deprecated
        public SQLConnection setQueryTimeout​(int timeoutInSeconds)
        Deprecated.
        instead use setOptions(SQLOptions) with SQLOptions.setQueryTimeout(int)
        Parameters:
        timeoutInSeconds - the max amount of seconds the query can take to execute.
        Returns:
        the instance of SQLConnection to chain method calls.
      • batch

        public io.smallrye.mutiny.Uni<List<Integer>> batch​(List<String> sqlStatements)
        Batch simple SQL strings and execute the batch where the async result contains a array of Integers.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        sqlStatements - sql statement
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • batchAndAwait

        public List<Integer> batchAndAwait​(List<String> sqlStatements)
        Blocking variant of io.vertx.mutiny.ext.sql.SQLConnection#batch(List).

        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:
        sqlStatements - sql statement
        Returns:
        the List instance produced by the operation.
      • batchAndForget

        public SQLConnection batchAndForget​(List<String> sqlStatements)
        Variant of io.vertx.mutiny.ext.sql.SQLConnection#batch(List) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.sql.SQLConnection#batch(List), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.sql.SQLConnection#batch(List) but you don't need to compose it with other operations.

        Parameters:
        sqlStatements - sql statement
        Returns:
        the instance of SQLConnection to chain method calls.
      • batchWithParams

        public io.smallrye.mutiny.Uni<List<Integer>> batchWithParams​(String sqlStatement,
                                                                     List<io.vertx.core.json.JsonArray> args)
        Batch a prepared statement with all entries from the args list. Each entry is a batch. The operation completes with the execution of the batch where the async result contains a array of Integers.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        sqlStatement - sql statement
        args - the prepared statement arguments
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • batchWithParamsAndAwait

        public List<Integer> batchWithParamsAndAwait​(String sqlStatement,
                                                     List<io.vertx.core.json.JsonArray> args)
        Blocking variant of io.vertx.mutiny.ext.sql.SQLConnection#batchWithParams(String,List).

        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:
        sqlStatement - sql statement
        args - the prepared statement arguments
        Returns:
        the List instance produced by the operation.
      • batchWithParamsAndForget

        public SQLConnection batchWithParamsAndForget​(String sqlStatement,
                                                      List<io.vertx.core.json.JsonArray> args)
        Variant of io.vertx.mutiny.ext.sql.SQLConnection#batchWithParams(String,List) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.sql.SQLConnection#batchWithParams(String,List), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.sql.SQLConnection#batchWithParams(String,List) but you don't need to compose it with other operations.

        Parameters:
        sqlStatement - sql statement
        args - the prepared statement arguments
        Returns:
        the instance of SQLConnection to chain method calls.
      • batchCallableWithParams

        public io.smallrye.mutiny.Uni<List<Integer>> batchCallableWithParams​(String sqlStatement,
                                                                             List<io.vertx.core.json.JsonArray> inArgs,
                                                                             List<io.vertx.core.json.JsonArray> outArgs)
        Batch a callable statement with all entries from the args list. Each entry is a batch. The size of the lists inArgs and outArgs MUST be the equal. The operation completes with the execution of the batch where the async result contains a array of Integers.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        sqlStatement - sql statement
        inArgs - the callable statement input arguments
        outArgs - the callable statement output arguments
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • batchCallableWithParamsAndAwait

        public List<Integer> batchCallableWithParamsAndAwait​(String sqlStatement,
                                                             List<io.vertx.core.json.JsonArray> inArgs,
                                                             List<io.vertx.core.json.JsonArray> outArgs)
        Blocking variant of io.vertx.mutiny.ext.sql.SQLConnection#batchCallableWithParams(String,List,List).

        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:
        sqlStatement - sql statement
        inArgs - the callable statement input arguments
        outArgs - the callable statement output arguments
        Returns:
        the List instance produced by the operation.
      • batchCallableWithParamsAndForget

        public SQLConnection batchCallableWithParamsAndForget​(String sqlStatement,
                                                              List<io.vertx.core.json.JsonArray> inArgs,
                                                              List<io.vertx.core.json.JsonArray> outArgs)
        Variant of io.vertx.mutiny.ext.sql.SQLConnection#batchCallableWithParams(String,List,List) that ignores the result of the operation.

        This method subscribes on the result of io.vertx.mutiny.ext.sql.SQLConnection#batchCallableWithParams(String,List,List), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from io.vertx.mutiny.ext.sql.SQLConnection#batchCallableWithParams(String,List,List) but you don't need to compose it with other operations.

        Parameters:
        sqlStatement - sql statement
        inArgs - the callable statement input arguments
        outArgs - the callable statement output arguments
        Returns:
        the instance of SQLConnection to chain method calls.
      • setTransactionIsolation

        public io.smallrye.mutiny.Uni<Void> setTransactionIsolation​(io.vertx.ext.sql.TransactionIsolation isolation)
        Attempts to change the transaction isolation level for this Connection object to the one given. The constants defined in the interface Connection are the possible transaction isolation levels.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        isolation - the level of isolation
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • setTransactionIsolationAndAwait

        public Void setTransactionIsolationAndAwait​(io.vertx.ext.sql.TransactionIsolation isolation)
        Blocking variant of setTransactionIsolation(TransactionIsolation).

        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:
        isolation - the level of isolation
        Returns:
        the Void instance produced by the operation.
      • getTransactionIsolation

        public io.smallrye.mutiny.Uni<io.vertx.ext.sql.TransactionIsolation> getTransactionIsolation()
        Attempts to return the transaction isolation level for this Connection object to the one given.

        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.
      • getTransactionIsolationAndAwait

        public io.vertx.ext.sql.TransactionIsolation getTransactionIsolationAndAwait()
        Blocking variant of getTransactionIsolation().

        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 TransactionIsolation instance produced by the operation.
      • getTransactionIsolationAndForget

        public SQLConnection getTransactionIsolationAndForget()
        Variant of getTransactionIsolation() that ignores the result of the operation.

        This method subscribes on the result of getTransactionIsolation(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from getTransactionIsolation() but you don't need to compose it with other operations.

        Returns:
        the instance of SQLConnection to chain method calls.
      • newInstance

        public static SQLConnection newInstance​(io.vertx.ext.sql.SQLConnection arg)