Class UpdateScope
Object
gudusoft.gsqlparser.resolver2.scope.AbstractScope
gudusoft.gsqlparser.resolver2.scope.UpdateScope
- All Implemented Interfaces:
IScope
Scope for UPDATE statement.
Contains:
- Target table (the UPDATE table)
- FROM clause scope (optional - for UPDATE...FROM syntax)
- SET clause columns
- WHERE clause scope
Example:
UPDATE titles
SET total_sales = total_sales + qty
FROM titles, salesdetail, sales
WHERE titles.title_id = salesdetail.title_id
Resolution strategy:
- SET clause columns resolve from target table or FROM clause tables
- WHERE clause columns resolve from all visible tables
-
Field Summary
Fields inherited from class gudusoft.gsqlparser.resolver2.scope.AbstractScope
node, parent, scopeType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDefault implementation: delegate to parentvoidresolve(List<String> names, INameMatcher matcher, boolean deep, IResolved resolved) Resolve a name within this UPDATE scope.resolveTable(String tableName) Default implementation: delegate to parentvoidsetFromScope(FromScope fromScope) voidsetWhereScope(IScope whereScope) toString()Methods inherited from class gudusoft.gsqlparser.resolver2.scope.AbstractScope
addChild, fullyQualify, getChildren, getNode, getParent, getScopeType, isWithin
-
Constructor Details
-
UpdateScope
-
-
Method Details
-
setFromScope
-
getFromScope
-
setWhereScope
-
getWhereScope
-
getUpdateStatement
-
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
-
getVisibleNamespaces
Description copied from class:AbstractScopeDefault implementation: delegate to parent- Specified by:
getVisibleNamespacesin interfaceIScope- Overrides:
getVisibleNamespacesin classAbstractScope- Returns:
- List of visible namespaces
-
resolve
Resolve a name within this UPDATE scope. Resolution strategy: 1. For unqualified names (col): first check parent scope for PL/SQL variables, then search all visible namespaces in FROM scope 2. For qualified names (t.col): find table t in FROM scope, then resolve col 3. Delegate to parent for names not found locally- 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
-
toString
- Overrides:
toStringin classAbstractScope
-