Interface Schema

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Schema.TableType
      Table type.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Expression getExpression​(SchemaPlus parentSchema, java.lang.String name)
      Returns the expression by which this schema can be referenced in generated code.
      java.util.Set<java.lang.String> getFunctionNames()
      Returns the names of the functions in this schema.
      java.util.Collection<Function> getFunctions​(java.lang.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​(java.lang.String name)
      Returns a sub-schema with a given name, or null.
      java.util.Set<java.lang.String> getSubSchemaNames()
      Returns the names of this schema's child schemas.
      Table getTable​(java.lang.String name)
      Returns a table with a given name, or null if not found.
      java.util.Set<java.lang.String> getTableNames()
      Returns the names of the tables in this schema.
      RelProtoDataType getType​(java.lang.String name)
      Returns a type with a given name, or null if not found.
      java.util.Set<java.lang.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 getTable(String).
      Schema snapshot​(SchemaVersion version)
      Returns the snapshot of this schema as of the specified time.
    • Method Detail

      • getTable

        Table getTable​(java.lang.String name)
        Returns a table with a given name, or null if not found.
        Parameters:
        name - Table name
        Returns:
        Table, or null
      • getTableNames

        java.util.Set<java.lang.String> getTableNames()
        Returns the names of the tables in this schema.
        Returns:
        Names of the tables in this schema
      • getType

        RelProtoDataType getType​(java.lang.String name)
        Returns a type with a given name, or null if not found.
        Parameters:
        name - Table name
        Returns:
        Table, or null
      • getTypeNames

        java.util.Set<java.lang.String> getTypeNames()
        Returns the names of the types in this schema.
        Returns:
        Names of the tables in this schema
      • getFunctions

        java.util.Collection<Function> getFunctions​(java.lang.String name)
        Returns a list of functions in this schema with the given name, or an empty list if there is no such function.
        Parameters:
        name - Name of function
        Returns:
        List of functions with given name, or empty list
      • getFunctionNames

        java.util.Set<java.lang.String> getFunctionNames()
        Returns the names of the functions in this schema.
        Returns:
        Names of the functions in this schema
      • getSubSchema

        Schema getSubSchema​(java.lang.String name)
        Returns a sub-schema with a given name, or null.
        Parameters:
        name - Sub-schema name
        Returns:
        Sub-schema with a given name, or null
      • getSubSchemaNames

        java.util.Set<java.lang.String> getSubSchemaNames()
        Returns the names of this schema's child schemas.
        Returns:
        Names of this schema's child schemas
      • getExpression

        Expression getExpression​(SchemaPlus parentSchema,
                                 java.lang.String name)
        Returns the expression by which this schema can be referenced in generated code.
        Parameters:
        parentSchema - Parent schema
        name - Name of this schema
        Returns:
        Expression by which this schema can be referenced in generated code
      • isMutable

        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 getTable(String).

        Even if this method returns true, the maps are not modified. Calcite stores the defined objects in a wrapper object.

        Returns:
        Whether the user is allowed to create new tables, functions and sub-schemas in this schema
      • snapshot

        Schema snapshot​(SchemaVersion version)
        Returns the snapshot of this schema as of the specified time. The contents of the schema snapshot should not change over time.
        Parameters:
        version - The current schema version
        Returns:
        the schema snapshot.