use of org.jooq.util.TableDefinition in project jOOQ by jOOQ.
the class XMLDatabase method getTables0.
@Override
protected List<TableDefinition> getTables0() {
List<TableDefinition> result = new ArrayList<TableDefinition>();
for (Table table : info().getTables()) {
if (getInputSchemata().contains(table.getTableSchema())) {
SchemaDefinition schema = getSchema(table.getTableSchema());
result.add(new XMLTableDefinition(schema, info(), table));
}
}
return result;
}
use of org.jooq.util.TableDefinition in project jOOQ by jOOQ.
the class XMLDatabase method loadUniqueKeys.
@Override
protected void loadUniqueKeys(DefaultRelations relations) {
for (KeyColumnUsage usage : keyColumnUsage(UNIQUE)) {
SchemaDefinition schema = getSchema(usage.getConstraintSchema());
String key = usage.getConstraintName();
String tableName = usage.getTableName();
String columnName = usage.getColumnName();
TableDefinition table = getTable(schema, tableName);
if (table != null) {
relations.addPrimaryKey(key, table.getColumn(columnName));
}
}
}
Aggregations