@Override
        public E map(ResultSet rs, int columnNumber, StatementContext ctx) throws SQLException {
            int ordinal = rs.getInt(columnNumber);

            try {
                return rs.wasNull() ? null : enumConstants[ordinal];
            } catch (ArrayIndexOutOfBoundsException oob) {
                throw new UnableToProduceResultException(String.format(
                        "no %s value could be matched to the ordinal %s", enumClass.getSimpleName(), ordinal),
                    oob, ctx);
            }
        }
Map database integer values to enum ordinal values.

@param <E> the enum type to map
@param type the enum type to map
@return an enum mapper that matches on {@link Enum#ordinal()}
core/src/main/java/org/jdbi/v3/core/mapper/EnumMapper.java