Package gudusoft.gsqlparser.sqlenv
Class TSQLSchema
Object
gudusoft.gsqlparser.sqlenv.TSQLObject
gudusoft.gsqlparser.sqlenv.TSQLSchema
SQL schema, contains a list of schema objects.
-
Field Summary
Fields inherited from class gudusoft.gsqlparser.sqlenv.TSQLObject
dataObjectType, name, nameKeepCase, sqlEnv -
Constructor Summary
ConstructorsConstructorDescriptionTSQLSchema(TSQLCatalog sqlCatalog, String schemaName) Create a new instance of the schema, added to the catalog. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddSchemaObject(TSQLSchemaObject schemaObject) add database objectbooleancontainsTable(String tableName) createFunction(String functionName) create a function belong to this schemacreateOraclePackage(String oraclePackageName) create a oracle package belong to this schemacreateProcedure(String procedureName) create a procedure belong to this schemacreateProcedure(String procedureName, ESQLDataObjectType type) createSchemaObject(String schemaObjectName, ESQLDataObjectType dataObjectType) protected TSQLSchemaObjectcreateSchemaObject(String schemaObjectName, ESQLDataObjectType dataObjectType, int priority) createSynonyms(String synonymsName) create a synonyms belong to this schemacreateTable(String tableName) create a table belong to this schema.createTable(String tableName, int priority) createTrigger(String triggerName) create a trigger belong to this schemafindSchemaObject(String schemaObjectName) getPackageObjectList(TSQLOraclePackage oraclePackage) qualified name for database object such as: databaseName.schemaName.tableNamebooleanisSealed()Check if this schema is sealed (Phase 6).voidseal()Seal this schema to prevent further modifications (Phase 6).Methods inherited from class gudusoft.gsqlparser.sqlenv.TSQLObject
compareTo, compareTo, compareTo, compareTo, getDataObjectType, getName, getNameKeepCase, getSqlEnv, isDelimitedIdentifier, isDelimitedIdentifier, normalizeIdentifier, setDataObjectType
-
Constructor Details
-
TSQLSchema
Create a new instance of the schema, added to the catalog.- Parameters:
sqlCatalog- catalog contains this schemaschemaName- name of the schema
-
-
Method Details
-
getQualifiedName
Description copied from class:TSQLObjectqualified name for database object such as: databaseName.schemaName.tableName- Overrides:
getQualifiedNamein classTSQLObject- Returns:
- qualified name
-
getCatalog
-
seal
Seal this schema to prevent further modifications (Phase 6).See
TSQLEnv#seal()for detailed documentation. -
isSealed
Check if this schema is sealed (Phase 6).- Returns:
- true if sealed, false otherwise
-
getSchemaObjectList
-
getPackageObjectList
-
addSchemaObject
add database objectDual-write strategy: Updates both legacy schemaObjectMap and new type-specific maps for backward compatibility and performance optimization.
- Parameters:
schemaObject- schema object to add
-
createOraclePackage
create a oracle package belong to this schema- Parameters:
oraclePackageName- oracle package name- Returns:
- an instance of the oracle package
-
createProcedure
create a procedure belong to this schema- Parameters:
procedureName- procedure name- Returns:
- an instance of the SQL procedure
-
createProcedure
-
createFunction
create a function belong to this schema- Parameters:
functionName- function name- Returns:
- an instance of the SQL function.
-
createTrigger
create a trigger belong to this schema- Parameters:
triggerName- trigger name- Returns:
- an instance of the SQL trigger.
-
createSynonyms
create a synonyms belong to this schema- Parameters:
synonymsName- synonyms name- Returns:
- an instance of the SQL synonyms
-
createTable
create a table belong to this schema. If table with the same name already exists in the schema return the existing table.- Parameters:
tableName- table name- Returns:
- an instance of the SQL table
-
createTable
-
containsTable
-
findTable
-
findSchemaObject
-
createSchemaObject
public TSQLSchemaObject createSchemaObject(String schemaObjectName, ESQLDataObjectType dataObjectType) - Parameters:
schemaObjectName- 该名称不带 catalog, schema 前缀dataObjectType-- Returns:
-
createSchemaObject
protected TSQLSchemaObject createSchemaObject(String schemaObjectName, ESQLDataObjectType dataObjectType, int priority) - Parameters:
schemaObjectName- 该名称不带 catalog, schema 前缀dataObjectType-priority-- Returns:
-