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;
}
Aggregations