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 the original non Mutiny-ified interface using Vert.x codegen.

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

        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

        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).

        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        Returns:
        the ResultSet instance produced by the operation.
      • queryAndForget

        SQLOperations 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.

        Parameters:
        sql - the SQL to execute. For example SELECT * 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 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.

        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

        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).

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

        SQLOperations queryWithParamsAndForget​(String sql,
                                               io.vertx.core.json.JsonArray params)
        Variant of queryWithParams(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 from queryWithParams(String,JsonArray) but you don't need to compose it with other operations.

        Parameters:
        sql - the SQL to execute. For example SELECT * 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 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.

        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

        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).

        Parameters:
        sql - the SQL to execute. For example SELECT * FROM table ....
        Returns:
        the SQLRowStream instance produced by the operation.
      • queryStreamAndForget

        SQLOperations 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.

        Parameters:
        sql - the SQL to execute. For example SELECT * 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 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.

        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

        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).

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

        SQLOperations queryStreamWithParamsAndForget​(String sql,
                                                     io.vertx.core.json.JsonArray params)
        Variant of queryStreamWithParams(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 from queryStreamWithParams(String,JsonArray) but you don't need to compose it with other operations.

        Parameters:
        sql - the SQL to execute. For example SELECT * 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 of 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).

        Parameters:
        sql - the statement to execute
        Returns:
        the JsonArray instance produced by the operation.
      • querySingleAndForget

        SQLOperations querySingleAndForget​(String sql)
        Variant of querySingle(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 from querySingle(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 execute
        arguments - 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 of 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).

        Parameters:
        sql - the statement to execute
        arguments - the arguments
        Returns:
        the JsonArray instance produced by the operation.
      • update

        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.

        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

        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).

        Parameters:
        sql - the SQL to execute. For example INSERT INTO table ...
        Returns:
        the UpdateResult instance produced by the operation.
      • updateAndForget

        SQLOperations 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.

        Parameters:
        sql - the SQL to execute. For example INSERT 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 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.

        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

        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).

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

        SQLOperations updateWithParamsAndForget​(String sql,
                                                io.vertx.core.json.JsonArray params)
        Variant of updateWithParams(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 from updateWithParams(String,JsonArray) but you don't need to compose it with other operations.

        Parameters:
        sql - the SQL to execute. For example INSERT 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 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.

        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 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).

        Parameters:
        sql - the SQL to execute. For example {call getEmpName}.
        Returns:
        the ResultSet instance produced by the operation.
      • callAndForget

        SQLOperations 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.

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

        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 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).

        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 of callWithParams(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 from callWithParams(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)