All Downloads are FREE. Search and download functionalities are using the official Maven repository.

marquez.db.mappers.RunArgsRowMapper Maven / Gradle / Ivy

There is a newer version: 0.49.0
Show newest version
/*
 * Copyright 2018-2023 contributors to the Marquez project
 * SPDX-License-Identifier: Apache-2.0
 */

package marquez.db.mappers;

import static marquez.db.Columns.stringOrThrow;
import static marquez.db.Columns.timestampOrThrow;
import static marquez.db.Columns.uuidOrThrow;

import java.sql.ResultSet;
import java.sql.SQLException;
import lombok.NonNull;
import marquez.db.Columns;
import marquez.db.models.RunArgsRow;
import org.jdbi.v3.core.mapper.RowMapper;
import org.jdbi.v3.core.statement.StatementContext;

public final class RunArgsRowMapper implements RowMapper {
  @Override
  public RunArgsRow map(@NonNull ResultSet results, @NonNull StatementContext context)
      throws SQLException {
    return new RunArgsRow(
        uuidOrThrow(results, Columns.ROW_UUID),
        timestampOrThrow(results, Columns.CREATED_AT),
        stringOrThrow(results, Columns.ARGS),
        stringOrThrow(results, Columns.CHECKSUM));
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy