io.vertx.sqlclient

## Interface SqlClient

- All Known Subinterfaces:
    MySQLConnection, MySQLPool, PgConnection, PgPool, Pool, SqlConnection, Transaction

      public interface SqlClient

  Defines the client operations with a database server.
  Author:
    Julien Viet

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close the client and release the associated resources.
    `<R> SqlClient` | `preparedBatch(String sql, List<Tuple> batch, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Prepare and execute a createBatch.
    `SqlClient` | `preparedBatch(String sql, List<Tuple> batch, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a createBatch.
    `<R> SqlClient` | `preparedQuery(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Prepare and execute a query.
    `SqlClient` | `preparedQuery(String sql, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a query.
    `<R> SqlClient` | `preparedQuery(String sql, Tuple arguments, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Prepare and execute a query.
    `SqlClient` | `preparedQuery(String sql, Tuple arguments, Handler<AsyncResult<RowSet<Row>>> handler)` Prepare and execute a query.
    `<R> SqlClient` | `query(String sql, java.util.stream.Collector<Row,?,R> collector, Handler<AsyncResult<SqlResult<R>>> handler)` Execute a simple query.
    `SqlClient` | `query(String sql, Handler<AsyncResult<RowSet<Row>>> handler)` Execute a simple query.

- - ### Method Detail

    - #### query

          SqlClient query(String sql,
                          Handler<AsyncResult<RowSet<Row>>> handler)

      Execute a simple query.
      Parameters:
        `sql` - the query SQL
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### query

          <R> SqlClient query(String sql,
                              java.util.stream.Collector<Row,?,R> collector,
                              Handler<AsyncResult<SqlResult<R>>> handler)

      Execute a simple query.
      Parameters:
        `sql` - the query SQL
        `collector` - the collector
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedQuery

          SqlClient preparedQuery(String sql,
                                  Handler<AsyncResult<RowSet<Row>>> handler)

      Prepare and execute a query.
      Parameters:
        `sql` - the prepared query SQL
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedQuery

          <R> SqlClient preparedQuery(String sql,
                                      java.util.stream.Collector<Row,?,R> collector,
                                      Handler<AsyncResult<SqlResult<R>>> handler)

      Prepare and execute a query.
      Parameters:
        `sql` - the prepared query SQL
        `collector` - the collector
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedQuery

          SqlClient preparedQuery(String sql,
                                  Tuple arguments,
                                  Handler<AsyncResult<RowSet<Row>>> handler)

      Prepare and execute a query.
      Parameters:
        `sql` - the prepared query SQL
        `arguments` - the list of arguments
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedQuery

          <R> SqlClient preparedQuery(String sql,
                                      Tuple arguments,
                                      java.util.stream.Collector<Row,?,R> collector,
                                      Handler<AsyncResult<SqlResult<R>>> handler)

      Prepare and execute a query.
      Parameters:
        `sql` - the prepared query SQL
        `arguments` - the list of arguments
        `collector` - the collector
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedBatch

          SqlClient preparedBatch(String sql,
                                  List<Tuple> batch,
                                  Handler<AsyncResult<RowSet<Row>>> handler)

      Prepare and execute a createBatch.
      Parameters:
        `sql` - the prepared query SQL
        `batch` - the batch of tuples
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### preparedBatch

          <R> SqlClient preparedBatch(String sql,
                                      List<Tuple> batch,
                                      java.util.stream.Collector<Row,?,R> collector,
                                      Handler<AsyncResult<SqlResult<R>>> handler)

      Prepare and execute a createBatch.
      Parameters:
        `sql` - the prepared query SQL
        `batch` - the batch of tuples
        `collector` - the collector
        `handler` - the handler notified with the execution result
      Returns:
        a reference to this, so the API can be used fluently

    - #### close

          void close()

      Close the client and release the associated resources.

Copyright © 2019 Eclipse. All rights reserved.