Package org.apache.calcite.schema.impl
Class DelegatingSchema
java.lang.Object
org.apache.calcite.schema.impl.DelegatingSchema
- All Implemented Interfaces:
Schema
Implementation of
Schema
that delegates to
an underlying schema.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
Schema.TableType
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetExpression
(@Nullable SchemaPlus parentSchema, String name) Returns the expression by which this schema can be referenced in generated code.Returns the names of the functions in this schema.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.@Nullable Schema
getSubSchema
(String name) Returns a sub-schema with a given name, or null.Returns the names of this schema's child schemas.@Nullable Table
Returns a table with a given name, or null if not found.Returns the names of the tables in this schema.@Nullable RelProtoDataType
Returns a type with a given name, or null if not found.Returns the names of the types in this schema.boolean
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 asSchema.getTable(String)
.snapshot
(SchemaVersion version) Returns the snapshot of this schema as of the specified time.toString()
-
Field Details
-
schema
-
-
Constructor Details
-
DelegatingSchema
Creates a DelegatingSchema.- Parameters:
schema
- Underlying schema
-
-
Method Details
-
toString
-
isMutable
public boolean isMutable()Description copied from interface:Schema
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 asSchema.getTable(String)
.Even if this method returns true, the maps are not modified. Calcite stores the defined objects in a wrapper object.
-
snapshot
Description copied from interface:Schema
Returns the snapshot of this schema as of the specified time. The contents of the schema snapshot should not change over time. -
getExpression
Description copied from interface:Schema
Returns the expression by which this schema can be referenced in generated code.- Specified by:
getExpression
in interfaceSchema
- Parameters:
parentSchema
- Parent schemaname
- Name of this schema- Returns:
- Expression by which this schema can be referenced in generated code
-
getTable
Description copied from interface:Schema
Returns a table with a given name, or null if not found. -
getTableNames
Description copied from interface:Schema
Returns the names of the tables in this schema.- Specified by:
getTableNames
in interfaceSchema
- Returns:
- Names of the tables in this schema
-
getType
Description copied from interface:Schema
Returns a type with a given name, or null if not found. -
getTypeNames
Description copied from interface:Schema
Returns the names of the types in this schema.- Specified by:
getTypeNames
in interfaceSchema
- Returns:
- Names of the tables in this schema
-
getFunctions
Description copied from interface:Schema
Returns a list of functions in this schema with the given name, or an empty list if there is no such function.- Specified by:
getFunctions
in interfaceSchema
- Parameters:
name
- Name of function- Returns:
- List of functions with given name, or empty list
-
getFunctionNames
Description copied from interface:Schema
Returns the names of the functions in this schema.- Specified by:
getFunctionNames
in interfaceSchema
- Returns:
- Names of the functions in this schema
-
getSubSchema
Description copied from interface:Schema
Returns a sub-schema with a given name, or null.- Specified by:
getSubSchema
in interfaceSchema
- Parameters:
name
- Sub-schema name- Returns:
- Sub-schema with a given name, or null
-
getSubSchemaNames
Description copied from interface:Schema
Returns the names of this schema's child schemas.- Specified by:
getSubSchemaNames
in interfaceSchema
- Returns:
- Names of this schema's child schemas
-