private List<String> enumConstantsOf(Dbms dbms, Table table, String columnName) throws SQLException {
        final DatabaseNamingConvention naming = new SqliteNamingConvention(); // This should be handled via the injector

        final String sql = String.format(
            "show columns from %s where field=%s;",
            naming.fullNameOf(table),
            naming.quoteField(columnName)
        );

        try (final Connection conn = connectionPool.getConnection(dbms);
             final PreparedStatement ps = conn.prepareStatement(sql);
             final ResultSet rs = ps.executeQuery()) {

            if (rs.next()) {
                final String fullResult = rs.getString(2);

                if (fullResult.startsWith("enum('")
                    &&  fullResult.endsWith("')")) {

                    final String middle = fullResult.substring(5, fullResult.length() - 1);
                    return Stream.of(middle.split(","))
                        .map(s -> s.substring(1, s.length() - 1))
                        .filter(s -> !s.isEmpty())
                        .collect(toList());

                } else {
                    throw new SpeedmentException("Unexpected response (" + fullResult + ").");
                }
            } else {
                throw new SpeedmentException("Expected an result.");
            }
        }
    }
Queries the database for a list of ENUM constants belonging to the specified table and
column.

@param dbms           the dbms
@param table          the table
@param columnName     the column name
@return               list of enum constants.
@throws SQLException  if an error occured
runtime-parent/runtime-connector-parent/sqlite/src/main/java/com/speedment/runtime/connector/sqlite/internal/SqliteMetadataHandlerImpl.java