public class JdbcCatalogSchema extends AbstractSchema
This schema does not directly contain tables, but contains a sub-schema
for each schema in the catalog in the back-end. Each of those sub-schemas is
an instance of JdbcSchema.
This schema is lazy: it does not compute the list of schema names until
the first call to getSubSchemaMap(). Then it creates a
JdbcSchema for each schema name. Each JdbcSchema will populate its
tables on demand.
AbstractSchema.FactorySchema.TableType| Modifier and Type | Field and Description |
|---|---|
SqlDialect |
dialect |
| Constructor and Description |
|---|
JdbcCatalogSchema(DataSource dataSource,
SqlDialect dialect,
JdbcConvention convention,
String catalog)
Creates a JdbcCatalogSchema.
|
| Modifier and Type | Method and Description |
|---|---|
static JdbcCatalogSchema |
create(@Nullable SchemaPlus parentSchema,
String name,
DataSource dataSource,
SqlDialectFactory dialectFactory,
String catalog) |
static JdbcCatalogSchema |
create(@Nullable SchemaPlus parentSchema,
String name,
DataSource dataSource,
String catalog) |
DataSource |
getDataSource()
Returns the data source.
|
String |
getDefaultSubSchemaName()
Returns the name of the default sub-schema.
|
protected Map<String,Schema> |
getSubSchemaMap()
Returns a map of sub-schemas in this schema by name.
|
getExpression, getFunctionMultimap, getFunctionNames, getFunctions, getSubSchema, getSubSchemaNames, getTable, getTableMap, getTableNames, getType, getTypeMap, getTypeNames, isMutable, snapshotpublic final SqlDialect dialect
public JdbcCatalogSchema(DataSource dataSource, SqlDialect dialect, JdbcConvention convention, String catalog)
public static JdbcCatalogSchema create(@Nullable SchemaPlus parentSchema, String name, DataSource dataSource, String catalog)
public static JdbcCatalogSchema create(@Nullable SchemaPlus parentSchema, String name, DataSource dataSource, SqlDialectFactory dialectFactory, String catalog)
protected Map<String,Schema> getSubSchemaMap()
AbstractSchemaThe implementations of AbstractSchema.getSubSchemaNames()
and AbstractSchema.getSubSchema(String) depend on this map.
The default implementation of this method returns the empty map.
Override this method to change their behavior.
getSubSchemaMap in class AbstractSchemapublic String getDefaultSubSchemaName()
public DataSource getDataSource()
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.