package ru.yandex.webmaster3.storage.util.ydb.querybuilder.typesafe;

import java.util.function.Function;

/**
 * Created by Oleg Bazdyrev on 02/11/2021.
 */
@lombok.Value
public final class FieldMapper<ResultType, FieldType> {
    Field<FieldType> field;
    Function<ResultType, FieldType> mapper;

    public static <ResultType, FieldType> FieldMapper<ResultType, FieldType> create(Field<FieldType> field, Function<ResultType, FieldType> mapper) {
        return new FieldMapper<>(field, mapper);
    }
}
