Class SimpleCatalog.SimpleSchema
Object
gudusoft.gsqlparser.ext.calcite.catalog.impl.SimpleCatalog.SimpleSchema
- All Implemented Interfaces:
Schema
- Enclosing class:
- SimpleCatalog
Simple, mutable implementation of
Schema.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a table to this schema.createTable(String tableName) Creates and adds a new table to this schema with type "TABLE".createTable(String tableName, String tableType) Creates and adds a new table to this schema.Returns the catalog that this schema belongs to.getName()Returns the name of the schema.Returns a table by name, or null if not found.Returns all table names in this schema.Returns all tables in this schema.
-
Constructor Details
-
SimpleSchema
-
-
Method Details
-
getName
Description copied from interface:SchemaReturns the name of the schema. -
getCatalog
Description copied from interface:SchemaReturns the catalog that this schema belongs to.- Specified by:
getCatalogin interfaceSchema- Returns:
- Catalog
-
getTables
Description copied from interface:SchemaReturns all tables in this schema. -
getTable
Description copied from interface:SchemaReturns a table by name, or null if not found. -
getTableNames
Description copied from interface:SchemaReturns all table names in this schema.- Specified by:
getTableNamesin interfaceSchema- Returns:
- List of table names
-
addTable
Adds a table to this schema.- Parameters:
table- Table to add- Returns:
- This schema (for chaining)
-
createTable
Creates and adds a new table to this schema.- Parameters:
tableName- Table nametableType- Table type (e.g., "TABLE", "VIEW")- Returns:
- The newly created table
-
createTable
Creates and adds a new table to this schema with type "TABLE".- Parameters:
tableName- Table name- Returns:
- The newly created table
-