Class TSQLCatalog

Object
gudusoft.gsqlparser.sqlenv.TSQLObject
gudusoft.gsqlparser.sqlenv.TSQLCatalog

public class TSQLCatalog extends TSQLObject
In the most sql-implementation, Catalog is the anonymous of the Database. So, use this class represents a database.
  • Constructor Details

    • TSQLCatalog

      public TSQLCatalog(TSQLEnv sqlEnv, String catalogName)
      create a catalog and add to the SQL environment.
      Parameters:
      sqlEnv - SQL environment
      catalogName - catalog name
  • Method Details

    • seal

      public void seal()
      Seal this catalog to prevent further modifications (Phase 6).

      See TSQLEnv#seal() for detailed documentation.

    • isSealed

      public boolean 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

      protected TSQLSchema searchSchema(String schemaName)
    • addSchema

      protected void addSchema(TSQLSchema sqlSchema)
    • getSchema

      public TSQLSchema getSchema(String schemaName, boolean createIfNotExist)
      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 name
      createIfNotExist - create a new schema if this schema is not exist and the createIfNotExist parameter is true.
      Returns:
      the schema instance
    • createSchema

      public TSQLSchema createSchema(String schemaName)
      create a schema under this catalog
      Parameters:
      schemaName - schema name
      Returns:
      schema instance