public class MergeScope extends AbstractScope
node, parent, scopeType| Constructor and Description |
|---|
MergeScope(IScope parent,
TMergeSqlStatement stmt) |
| Modifier and Type | Method and Description |
|---|---|
FromScope |
getFromScope() |
TMergeSqlStatement |
getMergeStatement() |
List<INamespace> |
getVisibleNamespaces()
The namespaces a name in this scope can see: the scope's own, then those of its lookup parent, as
AbstractScope.resolve(java.util.List<java.lang.String>, gudusoft.gsqlparser.resolver2.matcher.INameMatcher, boolean, gudusoft.gsqlparser.resolver2.scope.IResolved) walks them. |
void |
resolve(List<String> names,
INameMatcher matcher,
boolean deep,
IResolved resolved)
Resolve a name within this MERGE scope.
|
INamespace |
resolveTable(String tableName)
Default implementation: delegate to parent
|
void |
setFromScope(FromScope fromScope) |
String |
toString() |
addAllDistinct, addChild, addOwnNamespaces, fullyQualify, getChildren, getLookupParent, getNode, getParent, getScopeType, isWithin, setLookupParentpublic MergeScope(IScope parent, TMergeSqlStatement stmt)
public void setFromScope(FromScope fromScope)
public FromScope getFromScope()
public TMergeSqlStatement getMergeStatement()
public INamespace resolveTable(String tableName)
AbstractScoperesolveTable in interface IScoperesolveTable in class AbstractScopetableName - Table name or aliaspublic List<INamespace> getVisibleNamespaces()
AbstractScopeAbstractScope.resolve(java.util.List<java.lang.String>, gudusoft.gsqlparser.resolver2.matcher.INameMatcher, boolean, gudusoft.gsqlparser.resolver2.scope.IResolved) walks them. A non-lateral derived table or CTE body hides its owner's FROM scope by a
lookup parent (ScopeBuilder.setLookupParent), so the structural parent is not followed here either
(Mantis 4820, Codex review).getVisibleNamespaces in interface IScopegetVisibleNamespaces in class AbstractScopepublic void resolve(List<String> names, INameMatcher matcher, boolean deep, IResolved resolved)
resolve in interface IScoperesolve in class AbstractScopenames - 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 matchespublic String toString()
toString in class AbstractScope