public static List<String> getColumnNames(ResultSet rs, UnaryOperator<String> caseStrategy) throws SQLException {

        final ResultSetMetaData metadata = rs.getMetaData();
        final int count = metadata.getColumnCount();
        final List<String> columnNames = new ArrayList<>(count);

        for (int i = 0; i < count; ++i) {
            columnNames.add(caseStrategy.apply(metadata.getColumnLabel(i + 1)));
        }

        return columnNames;
    }
Returns the name of all the columns present in the specified {@link ResultSet}. The caseStrategy operator is applied to all column names to
align upper/lower case etc.

@param rs           the {@link ResultSet} to get the column names of
@param caseStrategy Apply a specific case strategy to the column names.
@return list of all the column names in {@code rs} (will contain duplicates if multiple columns have the same name)
@throws SQLException See {@link ResultSet#getMetaData()}, {@link ResultSetMetaData#getColumnCount()}, and {@link ResultSetMetaData#getColumnLabel(int)}
@see CaseStrategy
core/src/main/java/org/jdbi/v3/core/mapper/reflect/ReflectionMapperUtil.java