Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.sql.compile
Class VerifyAggregateExpressionsVisitor  view VerifyAggregateExpressionsVisitor download VerifyAggregateExpressionsVisitor.java

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.VerifyAggregateExpressionsVisitor
All Implemented Interfaces:
org.apache.derby.iapi.sql.compile.Visitor

public class VerifyAggregateExpressionsVisitor
extends java.lang.Object
implements org.apache.derby.iapi.sql.compile.Visitor

If a RCL (SELECT list) contains an aggregate, then we must verify that the RCL (SELECT list) is valid. For ungrouped queries, the RCL must be composed entirely of valid aggregate expressions - in this case, no column references outside of an aggregate. For grouped aggregates, the RCL must be composed of grouping columns or valid aggregate expressions - in this case, the only column references allowed outside of an aggregate are grouping columns.


Field Summary
private  GroupByList groupByList
           
 
Constructor Summary
VerifyAggregateExpressionsVisitor(GroupByList groupByList)
           
 
Method Summary
 boolean skipChildren(org.apache.derby.iapi.sql.compile.Visitable node)
          Don't visit children under an aggregate
 boolean stopTraversal()
          Method that is called to see if query tree traversal should be stopped before visiting all nodes.
 org.apache.derby.iapi.sql.compile.Visitable visit(org.apache.derby.iapi.sql.compile.Visitable node)
          Verify that this expression is ok for an aggregate query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupByList

private GroupByList groupByList
Constructor Detail

VerifyAggregateExpressionsVisitor

public VerifyAggregateExpressionsVisitor(GroupByList groupByList)
Method Detail

visit

public org.apache.derby.iapi.sql.compile.Visitable visit(org.apache.derby.iapi.sql.compile.Visitable node)
                                                  throws org.apache.derby.iapi.error.StandardException
Verify that this expression is ok for an aggregate query.

Specified by:
visit in interface org.apache.derby.iapi.sql.compile.Visitor

skipChildren

public boolean skipChildren(org.apache.derby.iapi.sql.compile.Visitable node)
Don't visit children under an aggregate

Specified by:
skipChildren in interface org.apache.derby.iapi.sql.compile.Visitor

stopTraversal

public boolean stopTraversal()
Description copied from interface: org.apache.derby.iapi.sql.compile.Visitor
Method that is called to see if query tree traversal should be stopped before visiting all nodes. Useful for short circuiting traversal if we already know we are done.

Specified by:
stopTraversal in interface org.apache.derby.iapi.sql.compile.Visitor