Package io.vertx.sqlclient.templates

## Interface TupleMapper<T>

- Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

      @FunctionalInterface
      public interface TupleMapper<T>

  Map an arbitrary `T` object to a `Tuple`.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static TupleMapper<JsonObject>` | `jsonObject()` | Map a `JsonObject` to a `Tuple`.
    `Tuple` | `map​(Function<Integer,​String> mapping, int size, T params)` | The internal mapper contract that builds a tuple.
    `static <T> TupleMapper<T>` | `mapper​(Function<T,​Map<String,​Object>> fn)` | Create a mapper that associates a parameters object to a map of named parameters to their respective value.

- - ### Method Detail

    - #### mapper

          static <T> TupleMapper<T> mapper​(Function<T,​Map<String,​Object>> fn)

      Create a mapper that associates a parameters object to a map of named parameters to their respective value.
      Parameters:
        `fn` - the function turning a parameters object into a map
      Returns:
        the mapper

    - #### jsonObject

          static TupleMapper<JsonObject> jsonObject()

      Map a `JsonObject` to a `Tuple`.

    - #### map

          Tuple map​(Function<Integer,​String> mapping,
                    int size,
                    T params)

      The internal mapper contract that builds a tuple.
      Parameters:
        `mapping` - associates an index to template parameter name
        `size` - the tuple size
        `params` - the parameters object
      Returns:
        the tuple