[jOOQ/jOOQ#10682] Add Collection overload for CatalogMetaProvider, SchemaMetaProvider, TableMetaProvider constructors
This commit is contained in:
parent
4dbb40e58e
commit
1976d6eb26
@ -93,7 +93,6 @@ final class CatalogMetaImpl extends AbstractMeta {
|
||||
return filterSchemas(configuration, new HashSet<>(Arrays.asList(schemas)));
|
||||
}
|
||||
|
||||
|
||||
static final Meta filterSchemas(Configuration configuration, final Set<Schema> schemas) {
|
||||
|
||||
// TODO: Some schemas may belong to another catalog
|
||||
|
||||
@ -37,6 +37,10 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.Tools.EMPTY_CATALOG;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.Meta;
|
||||
@ -58,6 +62,10 @@ public class CatalogMetaProvider implements MetaProvider {
|
||||
this.catalogs = catalogs;
|
||||
}
|
||||
|
||||
public CatalogMetaProvider(Configuration configuration, Collection<? extends Catalog> catalogs) {
|
||||
this(configuration, catalogs.toArray(EMPTY_CATALOG));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Meta provide() {
|
||||
return CatalogMetaImpl.filterCatalogs(configuration, catalogs);
|
||||
|
||||
@ -37,6 +37,10 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.Tools.EMTPY_SCHEMA;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.Meta;
|
||||
import org.jooq.MetaProvider;
|
||||
@ -58,6 +62,10 @@ public class SchemaMetaProvider implements MetaProvider {
|
||||
this.schemas = schemas;
|
||||
}
|
||||
|
||||
public SchemaMetaProvider(Configuration configuration, Collection<? extends Schema> schemas) {
|
||||
this(configuration, schemas.toArray(EMTPY_SCHEMA));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Meta provide() {
|
||||
return CatalogMetaImpl.filterSchemas(configuration, schemas);
|
||||
|
||||
@ -37,6 +37,10 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.Tools.EMPTY_TABLE;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.jooq.Configuration;
|
||||
import org.jooq.Meta;
|
||||
import org.jooq.MetaProvider;
|
||||
@ -58,6 +62,10 @@ public class TableMetaProvider implements MetaProvider {
|
||||
this.tables = tables;
|
||||
}
|
||||
|
||||
public TableMetaProvider(Configuration configuration, Collection<? extends Table<?>> tables) {
|
||||
this(configuration, tables.toArray(EMPTY_TABLE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Meta provide() {
|
||||
return CatalogMetaImpl.filterTables(configuration, tables);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user