Class SimpleCatalog
Object
gudusoft.gsqlparser.ext.calcite.catalog.impl.SimpleCatalog
- All Implemented Interfaces:
Catalog
Simple, mutable implementation of
Catalog.
This implementation uses LinkedHashMap to maintain insertion order.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSchema(SimpleCatalog.SimpleSchema schema) Adds a schema to this catalog.createSchema(String schemaName) Creates and adds a new schema to this catalog.Returns the default schema name, or null if not set.getName()Returns the name of the catalog.Returns a schema by name, or null if not found.Returns all schema names in this catalog.Returns all schemas in this catalog.Returns a table by qualified name (schema.table), or null if not found.setDefaultSchemaName(String defaultSchemaName) Sets the default schema name.
-
Constructor Details
-
SimpleCatalog
-
-
Method Details
-
getName
Description copied from interface:CatalogReturns the name of the catalog. -
getSchemas
Description copied from interface:CatalogReturns all schemas in this catalog.- Specified by:
getSchemasin interfaceCatalog- Returns:
- List of schemas
-
getSchema
Description copied from interface:CatalogReturns a schema by name, or null if not found. -
getSchemaNames
Description copied from interface:CatalogReturns all schema names in this catalog.- Specified by:
getSchemaNamesin interfaceCatalog- Returns:
- List of schema names
-
getTable
Description copied from interface:CatalogReturns a table by qualified name (schema.table), or null if not found. -
getDefaultSchemaName
Description copied from interface:CatalogReturns the default schema name, or null if not set.- Specified by:
getDefaultSchemaNamein interfaceCatalog- Returns:
- Default schema name, or null
-
addSchema
Adds a schema to this catalog.- Parameters:
schema- Schema to add- Returns:
- This catalog (for chaining)
-
createSchema
Creates and adds a new schema to this catalog.- Parameters:
schemaName- Schema name- Returns:
- The newly created schema
-
setDefaultSchemaName
Sets the default schema name.- Parameters:
defaultSchemaName- Default schema name- Returns:
- This catalog (for chaining)
-