Class JsonSchema
- java.lang.Object
-
- org.apache.calcite.model.JsonSchema
-
- Direct Known Subclasses:
JsonJdbcSchema
,JsonMapSchema
public abstract class JsonSchema extends java.lang.Object
Schema schema element.Occurs within
JsonRoot.schemas
.- See Also:
Description of schema elements
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonSchema.Type
Built-in schema types.
-
Field Summary
Fields Modifier and Type Field Description java.lang.Boolean
autoLattice
Whether to create lattices in this schema based on queries occurring in other schemas.java.lang.Boolean
cache
Whether to cache metadata (tables, functions and sub-schemas) generated by this schema.java.util.List<JsonLattice>
lattices
java.util.List<JsonMaterialization>
materializations
List of tables in this schema that are materializations of queries.java.lang.String
name
Name of the schema.java.util.List<java.lang.Object>
path
SQL path that is used to resolve functions used in this schema.
-
Constructor Summary
Constructors Constructor Description JsonSchema()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
accept(ModelHandler handler)
void
visitChildren(ModelHandler modelHandler)
-
-
-
Field Detail
-
name
public java.lang.String name
Name of the schema.Required.
- See Also:
JsonRoot.defaultSchema
-
path
public java.util.List<java.lang.Object> path
SQL path that is used to resolve functions used in this schema.May be null, or a list, each element of which is a string or a string-list.
For example,
path: [ ['usr', 'lib'], 'lib' ]
declares a path with two elements: the schema '/usr/lib' and the schema '/lib'. Most schemas are at the top level, and for these you can use a string.
-
materializations
public final java.util.List<JsonMaterialization> materializations
List of tables in this schema that are materializations of queries.The list may be empty.
-
lattices
public final java.util.List<JsonLattice> lattices
-
cache
public java.lang.Boolean cache
Whether to cache metadata (tables, functions and sub-schemas) generated by this schema. Default value istrue
.If
false
, Calcite will go back to the schema each time it needs metadata, for example, each time it needs a list of tables in order to validate a query against the schema.If
true
, Calcite will cache the metadata the first time it reads it. This can lead to better performance, especially if name-matching is case-insensitive (seeLex.caseSensitive
).Tables, functions and sub-schemas explicitly created in a schema are not affected by this caching mechanism. They always appear in the schema immediately, and are never flushed.
-
autoLattice
public java.lang.Boolean autoLattice
Whether to create lattices in this schema based on queries occurring in other schemas. Default value isfalse
.
-
-
Method Detail
-
accept
public abstract void accept(ModelHandler handler)
-
visitChildren
public void visitChildren(ModelHandler modelHandler)
-
-