use of org.jooq.Catalog in project jOOQ by jOOQ.
the class CatalogMetaImpl method filterSchemas.
static final Meta filterSchemas(Configuration configuration, Set<Schema> schemas) {
Map<Name, Catalog> c = new LinkedHashMap<>();
Map<Name, List<Schema>> mapping = new LinkedHashMap<>();
for (Schema schema : schemas) mapping.computeIfAbsent(nameOrDefault(schema.getCatalog()), k -> new ArrayList<>()).add(schema);
for (Schema schema : schemas) c.computeIfAbsent(nameOrDefault(schema.getCatalog()), k -> new CatalogImpl(k) {
@Override
public List<Schema> getSchemas() {
return mapping.get(getQualifiedName());
}
});
return filterCatalogs(configuration, new LinkedHashSet<>(c.values())).filterSchemas(schemas::contains);
}
use of org.jooq.Catalog in project jOOQ by jOOQ.
the class CatalogImpl method accept.
@Override
public final void accept(Context<?> ctx) {
Catalog mappedCatalog = getMappedCatalog(ctx, this);
ctx.visit(mappedCatalog != null ? mappedCatalog.getUnqualifiedName() : getUnqualifiedName());
}
Aggregations