Package org.apache.calcite.adapter.jdbc
Class JdbcBaseSchema
java.lang.Object
org.apache.calcite.adapter.jdbc.JdbcBaseSchema
- All Implemented Interfaces:
Schema
- Direct Known Subclasses:
JdbcCatalogSchema
,JdbcSchema
Base class for JDBC schemas.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.calcite.schema.Schema
Schema.TableType
-
Constructor Summary
Constructors -
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.final 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.@Nullable Schema
getSubSchema
(String name) Deprecated.Deprecated.@Nullable Table
Deprecated.Deprecated.@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.Returns a lookup object to find sub schemas.tables()
Returns a lookup object to find tables.
-
Constructor Details
-
JdbcBaseSchema
public JdbcBaseSchema()
-
-
Method Details
-
tables
Description copied from interface:Schema
Returns a lookup object to find tables. -
getTable
Deprecated.Description copied from interface:Schema
Returns a table with a given name, or null if not found.Using `getTable` directly does not allow to distinguish between case sensitive and case insensitive lookups. This method always does a case sensitive lookup. Caseinsensitive lookup can be done by loading all table names using
Schema.getTableNames()
. This can be quite timeconsuming for huge databases. To speed this up, all table names must be cached. This will require a huge amount of additional memory. -
getTableNames
Deprecated.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
-
subSchemas
Description copied from interface:Schema
Returns a lookup object to find sub schemas.- Specified by:
subSchemas
in interfaceSchema
- Returns:
- Lookup
-
getSubSchema
Deprecated.Description copied from interface:Schema
Returns a sub-schema with a given name, or null.See also comment for
Schema.getTable(String)
to find out why you should do so.- Specified by:
getSubSchema
in interfaceSchema
- Parameters:
name
- Sub-schema name- Returns:
- Sub-schema with a given name, or null
-
getSubSchemaNames
Deprecated.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
-
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
-
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
-
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.
-