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 Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TupleMapper<JsonObject>` | `jsonObject()` Map a `JsonObject` to a `Tuple`.
    `Tuple` | `map(java.util.function.Function<Integer,String> mapping, int size, T params)` The internal mapper contract that builds a tuple.
    `static <T> TupleMapper<T>` | `mapper(java.util.function.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(java.util.function.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(java.util.function.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

Copyright © 2022 Eclipse. All rights reserved.