net.sf.saffron.sql
Class SqlValidator.JoinScope

java.lang.Object
  |
  +--net.sf.saffron.sql.SqlValidator.Scope
        |
        +--net.sf.saffron.sql.SqlValidator.JoinScope
Enclosing class:
SqlValidator

class SqlValidator.JoinScope
extends SqlValidator.Scope

The name-resolution scope of a JOIN operator. 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.


Field Summary
private  SqlJoin join
           
 
Fields inherited from class net.sf.saffron.sql.SqlValidator.Scope
parent
 
Constructor Summary
(package private) SqlValidator.JoinScope(SqlValidator.Scope parent, SqlJoin join)
           
 
Method Summary
(package private)  SqlNode getNode()
           
 SaffronType getRowType()
          Returns a list of names of output columns.
 SqlValidator.Scope resolve(String name, SqlValidator.Scope[] ancestorOut, int[] offsetOut)
          Looks up a node with a given name.
 void validate()
           
 
Methods inherited from class net.sf.saffron.sql.SqlValidator.Scope
deriveAlias, findQualifyingTableName, fullyQualify, getAlias, getScopeFromNode, getTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

join

private final SqlJoin join
Constructor Detail

SqlValidator.JoinScope

SqlValidator.JoinScope(SqlValidator.Scope parent,
                       SqlJoin join)
Method Detail

getNode

SqlNode getNode()
Specified by:
getNode in class SqlValidator.Scope

getRowType

public SaffronType getRowType()
Description copied from class: SqlValidator.Scope
Returns a list of names of output columns.

Specified by:
getRowType in class SqlValidator.Scope

resolve

public SqlValidator.Scope resolve(String name,
                                  SqlValidator.Scope[] ancestorOut,
                                  int[] offsetOut)
Description copied from class: SqlValidator.Scope
Looks up a node with a given name. Returns null if none is found.

Overrides:
resolve in class SqlValidator.Scope
Parameters:
name - Name of node to find
ancestorOut - If not null, writes the ancestor scope here
offsetOut - If not null, writes the offset within the ancestor here

validate

public void validate()
Overrides:
validate in class SqlValidator.Scope

SourceForge.net_Logo