Class OraclePackageScope
Object
gudusoft.gsqlparser.resolver2.scope.AbstractScope
gudusoft.gsqlparser.resolver2.scope.OraclePackageScope
- All Implemented Interfaces:
IScope
Scope for Oracle PL/SQL package bodies.
Provides access to package-level declarations for all nested procedures, functions, and blocks within the package body.
Name resolution priority within package body:
- Local variables (PlsqlBlockScope)
- Package members (OraclePackageNamespace)
- SQL table columns (SelectScope/FromScope)
- External packages (via GlobalScope)
-
Field Summary
Fields inherited from class gudusoft.gsqlparser.resolver2.scope.AbstractScope
node, parent, scopeType -
Constructor Summary
ConstructorsConstructorDescriptionOraclePackageScope(IScope parent, TPlsqlCreatePackage packageStmt, OraclePackageNamespace packageNamespace) Create a new Oracle package scope. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(INamespace namespace, String alias, boolean nullable) Default implementation: not supported (most scopes don't have children)Default implementation: empty listGet the package name.Get the package namespace.Default implementation: delegate to parentvoidresolve(List<String> names, INameMatcher matcher, boolean deep, IResolved resolved) Default implementation: delegate to parentresolveTable(String tableName) Default implementation: delegate to parenttoString()Methods inherited from class gudusoft.gsqlparser.resolver2.scope.AbstractScope
fullyQualify, getNode, getParent, getScopeType, isWithin
-
Constructor Details
-
OraclePackageScope
public OraclePackageScope(IScope parent, TPlsqlCreatePackage packageStmt, OraclePackageNamespace packageNamespace) Create a new Oracle package scope.- Parameters:
parent- The parent scopepackageStmt- The package AST nodepackageNamespace- The namespace containing package members
-
-
Method Details
-
getPackageNamespace
Get the package namespace.- Returns:
- The OraclePackageNamespace containing package-level declarations
-
getPackageName
Get the package name.- Returns:
- The package name
-
addChild
Description copied from class:AbstractScopeDefault implementation: not supported (most scopes don't have children)- Specified by:
addChildin interfaceIScope- Overrides:
addChildin classAbstractScope- Parameters:
namespace- The namespace to addalias- The alias for this namespacenullable- Whether this namespace is nullable (e.g., RIGHT side of LEFT JOIN)
-
getChildren
Description copied from class:AbstractScopeDefault implementation: empty list- Specified by:
getChildrenin interfaceIScope- Overrides:
getChildrenin classAbstractScope- Returns:
- List of scope children
-
resolveTable
Description copied from class:AbstractScopeDefault implementation: delegate to parent- Specified by:
resolveTablein interfaceIScope- Overrides:
resolveTablein classAbstractScope- Parameters:
tableName- Table name or alias- Returns:
- Namespace if found, null otherwise
-
resolve
Description copied from class:AbstractScopeDefault implementation: delegate to parent- Specified by:
resolvein interfaceIScope- Overrides:
resolvein classAbstractScope- Parameters:
names- Name parts (e.g., ["schema", "table", "column"])matcher- Name matcher for case sensitivity rulesdeep- Whether to recursively resolve into record fieldsresolved- Callback to collect all matches
-
getVisibleNamespaces
Description copied from class:AbstractScopeDefault implementation: delegate to parent- Specified by:
getVisibleNamespacesin interfaceIScope- Overrides:
getVisibleNamespacesin classAbstractScope- Returns:
- List of visible namespaces
-
toString
- Overrides:
toStringin classAbstractScope
-