Class DynamicSchema

java.lang.Object
org.apache.calcite.jdbc.CalciteSchema
org.apache.calcite.jdbc.DynamicSchema
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
DynamicRootSchema

public class DynamicSchema extends org.apache.calcite.jdbc.CalciteSchema implements AutoCloseable
Unlike SimpleCalciteSchema, DynamicSchema could have an empty or partial schemaMap, but it could maintain a map of name->SchemaFactory, and only register schema when the correspondent name is requested.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.calcite.jdbc.CalciteSchema

    org.apache.calcite.jdbc.CalciteSchema.Entry, org.apache.calcite.jdbc.CalciteSchema.FunctionEntry, org.apache.calcite.jdbc.CalciteSchema.FunctionEntryImpl, org.apache.calcite.jdbc.CalciteSchema.LatticeEntry, org.apache.calcite.jdbc.CalciteSchema.LatticeEntryImpl, org.apache.calcite.jdbc.CalciteSchema.TableEntry, org.apache.calcite.jdbc.CalciteSchema.TableEntryImpl, org.apache.calcite.jdbc.CalciteSchema.TypeEntry, org.apache.calcite.jdbc.CalciteSchema.TypeEntryImpl
  • Field Summary

    Fields inherited from class org.apache.calcite.jdbc.CalciteSchema

    functionMap, functionNames, latticeMap, name, nullaryFunctionMap, schema, subSchemaMap, tableMap, typeMap
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicSchema(org.apache.calcite.jdbc.CalciteSchema parent, org.apache.calcite.schema.Schema schema, String name)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.calcite.jdbc.CalciteSchema
    add(String name, org.apache.calcite.schema.Schema schema)
     
    protected void
    addImplicitFuncNamesToBuilder(com.google.common.collect.ImmutableSortedSet.Builder<String> arg0)
     
    protected void
    addImplicitFunctionsToBuilder(com.google.common.collect.ImmutableList.Builder<org.apache.calcite.schema.Function> arg0, String arg1, boolean arg2)
     
    protected void
    addImplicitSubSchemaToBuilder(com.google.common.collect.ImmutableSortedMap.Builder<String,org.apache.calcite.jdbc.CalciteSchema> arg0)
     
    protected void
    addImplicitTablesBasedOnNullaryFunctionsToBuilder(com.google.common.collect.ImmutableSortedMap.Builder<String,org.apache.calcite.schema.Table> arg0)
     
    protected void
    addImplicitTableToBuilder(com.google.common.collect.ImmutableSortedSet.Builder<String> arg0)
     
    protected void
    addImplicitTypeNamesToBuilder(com.google.common.collect.ImmutableSortedSet.Builder<String> arg0)
     
    void
     
    static org.apache.calcite.schema.SchemaPlus
    createRootSchema(StoragePluginRegistry storages, SchemaConfig schemaConfig, AliasRegistryProvider aliasRegistryProvider)
     
    protected org.apache.calcite.jdbc.CalciteSchema
    getImplicitSubSchema(String schemaName, boolean caseSensitive)
     
    protected org.apache.calcite.jdbc.CalciteSchema.TableEntry
    getImplicitTable(String tableName, boolean caseSensitive)
     
    protected org.apache.calcite.jdbc.CalciteSchema.TableEntry
     
    protected org.apache.calcite.jdbc.CalciteSchema.TypeEntry
    getImplicitType(String arg0, boolean arg1)
     
    protected boolean
     
    void
    setCache(boolean arg0)
     
    protected org.apache.calcite.jdbc.CalciteSchema
    snapshot(org.apache.calcite.jdbc.CalciteSchema arg0, org.apache.calcite.schema.SchemaVersion arg1)
     

    Methods inherited from class org.apache.calcite.jdbc.CalciteSchema

    add, add, add, createRootSchema, createRootSchema, createRootSchema, createRootSchema, createSnapshot, find, find, from, getFunctionNames, getFunctions, getLatticeMap, getName, getPath, getSubSchema, getSubSchemaMap, getTable, getTableBasedOnNullaryFunction, getTableBySql, getTableNames, getTablesBasedOnNullaryFunctions, getType, getTypeNames, isRoot, path, plus, removeFunction, removeSubSchema, removeTable, removeType, root, tableEntry, typeEntry

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DynamicSchema

      public DynamicSchema(org.apache.calcite.jdbc.CalciteSchema parent, org.apache.calcite.schema.Schema schema, String name)
  • Method Details

    • getImplicitSubSchema

      protected org.apache.calcite.jdbc.CalciteSchema getImplicitSubSchema(String schemaName, boolean caseSensitive)
    • createRootSchema

      public static org.apache.calcite.schema.SchemaPlus createRootSchema(StoragePluginRegistry storages, SchemaConfig schemaConfig, AliasRegistryProvider aliasRegistryProvider)
    • add

      public org.apache.calcite.jdbc.CalciteSchema add(String name, org.apache.calcite.schema.Schema schema)
    • getImplicitTable

      protected org.apache.calcite.jdbc.CalciteSchema.TableEntry getImplicitTable(String tableName, boolean caseSensitive)
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • setCache

      public void setCache(boolean arg0)
      Specified by:
      setCache in class org.apache.calcite.jdbc.CalciteSchema
    • getImplicitType

      protected org.apache.calcite.jdbc.CalciteSchema.TypeEntry getImplicitType(String arg0, boolean arg1)
      Specified by:
      getImplicitType in class org.apache.calcite.jdbc.CalciteSchema
    • addImplicitSubSchemaToBuilder

      protected void addImplicitSubSchemaToBuilder(com.google.common.collect.ImmutableSortedMap.Builder<String,org.apache.calcite.jdbc.CalciteSchema> arg0)
      Specified by:
      addImplicitSubSchemaToBuilder in class org.apache.calcite.jdbc.CalciteSchema
    • addImplicitTableToBuilder

      protected void addImplicitTableToBuilder(com.google.common.collect.ImmutableSortedSet.Builder<String> arg0)
      Specified by:
      addImplicitTableToBuilder in class org.apache.calcite.jdbc.CalciteSchema
    • addImplicitFunctionsToBuilder

      protected void addImplicitFunctionsToBuilder(com.google.common.collect.ImmutableList.Builder<org.apache.calcite.schema.Function> arg0, String arg1, boolean arg2)
      Specified by:
      addImplicitFunctionsToBuilder in class org.apache.calcite.jdbc.CalciteSchema
    • addImplicitFuncNamesToBuilder

      protected void addImplicitFuncNamesToBuilder(com.google.common.collect.ImmutableSortedSet.Builder<String> arg0)
      Specified by:
      addImplicitFuncNamesToBuilder in class org.apache.calcite.jdbc.CalciteSchema
    • addImplicitTypeNamesToBuilder

      protected void addImplicitTypeNamesToBuilder(com.google.common.collect.ImmutableSortedSet.Builder<String> arg0)
      Specified by:
      addImplicitTypeNamesToBuilder in class org.apache.calcite.jdbc.CalciteSchema
    • addImplicitTablesBasedOnNullaryFunctionsToBuilder

      protected void addImplicitTablesBasedOnNullaryFunctionsToBuilder(com.google.common.collect.ImmutableSortedMap.Builder<String,org.apache.calcite.schema.Table> arg0)
      Specified by:
      addImplicitTablesBasedOnNullaryFunctionsToBuilder in class org.apache.calcite.jdbc.CalciteSchema
    • getImplicitTableBasedOnNullaryFunction

      protected org.apache.calcite.jdbc.CalciteSchema.TableEntry getImplicitTableBasedOnNullaryFunction(String arg0, boolean arg1)
      Specified by:
      getImplicitTableBasedOnNullaryFunction in class org.apache.calcite.jdbc.CalciteSchema
    • snapshot

      protected org.apache.calcite.jdbc.CalciteSchema snapshot(org.apache.calcite.jdbc.CalciteSchema arg0, org.apache.calcite.schema.SchemaVersion arg1)
      Specified by:
      snapshot in class org.apache.calcite.jdbc.CalciteSchema
    • isCacheEnabled

      protected boolean isCacheEnabled()
      Specified by:
      isCacheEnabled in class org.apache.calcite.jdbc.CalciteSchema