Package gudusoft.gsqlparser.sqlenv
Class TSQLCatalog
Object
gudusoft.gsqlparser.sqlenv.TSQLObject
gudusoft.gsqlparser.sqlenv.TSQLCatalog
In the most sql-implementation, Catalog is the anonymous of the Database.
So, use this class represents a database.
-
Field Summary
Fields inherited from class gudusoft.gsqlparser.sqlenv.TSQLObject
dataObjectType, name, nameKeepCase, sqlEnv -
Constructor Summary
ConstructorsConstructorDescriptionTSQLCatalog(TSQLEnv sqlEnv, String catalogName) create a catalog and add to the SQL environment. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSchema(TSQLSchema sqlSchema) createSchema(String schemaName) create a schema under this catalogget a schema instance from the catalog, create a new schema if this schema is not exist and the createIfNotExist parameter is true.schema list in this catalogbooleanisSealed()Check if this catalog is sealed (Phase 6).voidseal()Seal this catalog to prevent further modifications (Phase 6).protected TSQLSchemasearchSchema(String schemaName) Methods inherited from class gudusoft.gsqlparser.sqlenv.TSQLObject
compareTo, compareTo, compareTo, compareTo, getDataObjectType, getName, getNameKeepCase, getQualifiedName, getSqlEnv, isDelimitedIdentifier, isDelimitedIdentifier, normalizeIdentifier, setDataObjectType
-
Constructor Details
-
TSQLCatalog
create a catalog and add to the SQL environment.- Parameters:
sqlEnv- SQL environmentcatalogName- catalog name
-
-
Method Details
-
seal
Seal this catalog to prevent further modifications (Phase 6).See
TSQLEnv#seal()for detailed documentation. -
isSealed
Check if this catalog is sealed (Phase 6).- Returns:
- true if sealed, false otherwise
-
getSchemaList
schema list in this catalog- Returns:
- schema list
-
searchSchema
-
addSchema
-
getSchema
get a schema instance from the catalog, create a new schema if this schema is not exist and the createIfNotExist parameter is true.- Parameters:
schemaName- schema namecreateIfNotExist- create a new schema if this schema is not exist and the createIfNotExist parameter is true.- Returns:
- the schema instance
-
createSchema
create a schema under this catalog- Parameters:
schemaName- schema name- Returns:
- schema instance
-