public class AbstractSchema extends Object implements Schema
Schema.
Behavior is as follows:
getTableMap().getFunctionMultimap().getSubSchemaMap().isMutable().| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSchema.Factory
Schema factory that creates an
AbstractSchema. |
Schema.TableType| Constructor and Description |
|---|
AbstractSchema() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.calcite.linq4j.tree.Expression |
getExpression(SchemaPlus parentSchema,
String name)
Returns the expression by which this schema can be referenced in generated
code.
|
protected com.google.common.collect.Multimap<String,Function> |
getFunctionMultimap()
Returns a multi-map of functions in this schema by name.
|
Set<String> |
getFunctionNames()
Returns the names of the functions in this schema.
|
Collection<Function> |
getFunctions(String name)
Returns a list of functions in this schema with the given name, or
an empty list if there is no such function.
|
Schema |
getSubSchema(String name)
Returns a sub-schema with a given name, or null.
|
protected Map<String,Schema> |
getSubSchemaMap()
Returns a map of sub-schemas in this schema by name.
|
Set<String> |
getSubSchemaNames()
Returns the names of this schema's child schemas.
|
Table |
getTable(String name)
Returns a table with a given name, or null if not found.
|
protected Map<String,Table> |
getTableMap()
Returns a map of tables in this schema by name.
|
Set<String> |
getTableNames()
Returns the names of the tables in this schema.
|
RelProtoDataType |
getType(String name)
Returns a type with a given name, or null if not found.
|
protected Map<String,RelProtoDataType> |
getTypeMap()
Returns a map of types in this schema by name.
|
Set<String> |
getTypeNames()
Returns the names of the types in this schema.
|
boolean |
isMutable()
Returns whether the user is allowed to create new tables, functions
and sub-schemas in this schema, in addition to those returned automatically
by methods such as
Schema.getTable(String). |
Schema |
snapshot(SchemaVersion version)
Returns the snapshot of this schema as of the specified time.
|
public boolean isMutable()
SchemaSchema.getTable(String).
Even if this method returns true, the maps are not modified. Calcite stores the defined objects in a wrapper object.
public Schema snapshot(SchemaVersion version)
Schemapublic org.apache.calcite.linq4j.tree.Expression getExpression(SchemaPlus parentSchema, String name)
SchemagetExpression in interface SchemaparentSchema - Parent schemaname - Name of this schemaprotected Map<String,Table> getTableMap()
The implementations of getTableNames()
and getTable(String) depend on this map.
The default implementation of this method returns the empty map.
Override this method to change their behavior.
public final Set<String> getTableNames()
SchemagetTableNames in interface Schemapublic final Table getTable(String name)
Schemaprotected Map<String,RelProtoDataType> getTypeMap()
The implementations of getTypeNames()
and getType(String) depend on this map.
The default implementation of this method returns the empty map.
Override this method to change their behavior.
public RelProtoDataType getType(String name)
Schemapublic Set<String> getTypeNames()
SchemagetTypeNames in interface Schemaprotected com.google.common.collect.Multimap<String,Function> getFunctionMultimap()
The implementations of getFunctionNames()
and Schema.getFunctions(String) depend on this map.
The default implementation of this method returns the empty multi-map.
Override this method to change their behavior.
public final Collection<Function> getFunctions(String name)
SchemagetFunctions in interface Schemaname - Name of functionpublic final Set<String> getFunctionNames()
SchemagetFunctionNames in interface Schemaprotected Map<String,Schema> getSubSchemaMap()
The implementations of getSubSchemaNames()
and getSubSchema(String) depend on this map.
The default implementation of this method returns the empty map.
Override this method to change their behavior.
public final Set<String> getSubSchemaNames()
SchemagetSubSchemaNames in interface Schemapublic final Schema getSubSchema(String name)
SchemagetSubSchema in interface Schemaname - Sub-schema nameCopyright © 2012-2020 Apache Software Foundation. All Rights Reserved.