Search in sources :

Example 1 with UDTDefinition

use of org.jooq.util.UDTDefinition in project jOOQ by jOOQ.

the class PostgresDatabase method getUDTs0.

@Override
protected List<UDTDefinition> getUDTs0() throws SQLException {
    List<UDTDefinition> result = new ArrayList<UDTDefinition>();
    // [#2736] This table is unavailable in Amazon Redshift
    if (exists(ATTRIBUTES)) {
        for (Record record : create().selectDistinct(ATTRIBUTES.UDT_SCHEMA, ATTRIBUTES.UDT_NAME).from(ATTRIBUTES).where(ATTRIBUTES.UDT_SCHEMA.in(getInputSchemata())).orderBy(ATTRIBUTES.UDT_SCHEMA, ATTRIBUTES.UDT_NAME).fetch()) {
            SchemaDefinition schema = getSchema(record.get(ATTRIBUTES.UDT_SCHEMA));
            String name = record.get(ATTRIBUTES.UDT_NAME);
            result.add(new PostgresUDTDefinition(schema, name, null));
        }
    }
    return result;
}
Also used : SchemaDefinition(org.jooq.util.SchemaDefinition) ArrayList(java.util.ArrayList) Record(org.jooq.Record) UDTDefinition(org.jooq.util.UDTDefinition)

Aggregations

ArrayList (java.util.ArrayList)1 Record (org.jooq.Record)1 SchemaDefinition (org.jooq.util.SchemaDefinition)1 UDTDefinition (org.jooq.util.UDTDefinition)1