org.eigenbase.sql.validate
Class JoinScope
java.lang.Object
org.eigenbase.sql.validate.DelegatingScope
org.eigenbase.sql.validate.ListScope
org.eigenbase.sql.validate.JoinScope
- All Implemented Interfaces:
- SqlValidatorScope
public class JoinScope
- extends ListScope
The name-resolution context for expression inside a JOIN clause. The objects
visible are the joined table expressions, and those inherited from the parent
scope.
Consider "SELECT * FROM (A JOIN B ON {exp1}) JOIN C ON {exp2}". {exp1} is
resolved in the join scope for "A JOIN B", which contains A and B but not
C.
- Since:
- Mar 25, 2003
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/validate/JoinScope.java#9 $
- Author:
- jhyde
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
usingScope
private final SqlValidatorScope usingScope
join
private final SqlJoin join
JoinScope
JoinScope(SqlValidatorScope parent,
SqlValidatorScope usingScope,
SqlJoin join)
- Creates a
JoinScope.
- Parameters:
parent - Parent scopeusingScope - Scope for resolving USING clausejoin - Call to JOIN operator
getNode
public SqlNode getNode()
- Description copied from interface:
SqlValidatorScope
- Returns the root node of this scope.
addChild
public void addChild(SqlValidatorNamespace ns,
String alias)
- Description copied from interface:
SqlValidatorScope
- Registers a relation in this scope.
- Specified by:
addChild in interface SqlValidatorScope- Overrides:
addChild in class ListScope
- Parameters:
ns - Namespace representing the result-columns of the relationalias - Alias with which to reference the relation, must not be null
lookupWindow
public SqlWindow lookupWindow(String name)
- Description copied from interface:
SqlValidatorScope
- Finds a window with a given name. Returns null if not found.
- Specified by:
lookupWindow in interface SqlValidatorScope- Overrides:
lookupWindow in class DelegatingScope
getUsingScope
public SqlValidatorScope getUsingScope()
- Returns the scope which is used for resolving USING clause.