Class JoinScope

  • All Implemented Interfaces:

    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.

    • Constructor Detail

      • JoinScope

        JoinScope​(SqlValidatorScope parent,
                  SqlValidatorScope usingScope,
                  SqlJoin join)
        Creates a JoinScope.
        parent - Parent scope
        usingScope - Scope for resolving USING clause
        join - Call to JOIN operator
    • Method Detail

      • getNode

        public SqlNode getNode()
        Description copied from interface: SqlValidatorScope
        Returns the root node of this scope. Never null.
      • addChild

        public void addChild​(SqlValidatorNamespace ns,
                             java.lang.String alias,
                             boolean nullable)
        Description copied from interface: SqlValidatorScope
        Registers a relation in this scope.
        Specified by:
        addChild in interface SqlValidatorScope
        addChild in class ListScope
        ns - Namespace representing the result-columns of the relation
        alias - Alias with which to reference the relation, must not be null
        nullable - Whether this is a null-generating side of a join
      • getUsingScope

        public SqlValidatorScope getUsingScope()
        Returns the scope which is used for resolving USING clause.
      • isWithin

        public boolean isWithin​(SqlValidatorScope scope2)
        Description copied from interface: SqlValidatorScope
        Returns whether this scope is enclosed within scope2 in such a way that it can see the contents of scope2.