001package org.itsallcode.jdbc.dialect;
002
003import java.sql.ResultSet;
004import java.sql.SQLException;
005
006/**
007 * Extracts a column value from a {@link ResultSet}.
008 */
009@FunctionalInterface
010public interface ColumnValueExtractor {
011    /**
012     * Extracts a column value from a {@link ResultSet}.
013     * 
014     * @param resultSet   the result set
015     * @param columnIndex column index (1 based)
016     * @return the column value
017     * @throws SQLException if reading the result set fails
018     */
019    Object getObject(ResultSet resultSet, int columnIndex) throws SQLException;
020}