gudusoft.gsqlparser.nodes
Class TGroupBy

java.lang.Object
  extended by gudusoft.gsqlparser.nodes.TParseTreeNode
      extended by gudusoft.gsqlparser.nodes.TGroupBy
All Implemented Interfaces:
Visitable

public class TGroupBy
extends TParseTreeNode

This class represents group by clause and having clause.

Specify the GROUP BY clause if you want the database to group the selected rows based on the value of expr(s) for each row and return a single row of summary information for each group.

If this clause contains CUBE or ROLLUP extensions, then the database produces superaggregate groupings in addition to the regular groupings.

Use the HAVING clause to restrict the groups of returned rows to those groups for which the specified condition is TRUE. If you omit this clause, then the database returns summary rows for all groups.


Constructor Summary
TGroupBy()
           
 
Method Summary
 void accept(TParseTreeVisitor v)
           
 void doParse(TCustomSqlStatement psql, ESqlClause plocation)
          analyze this node
 TExpression getHavingClause()
          Restrict the groups of returned rows to those groups for which the specified condition is TRUE.
 TGroupByItemList getItems()
           
 void init(java.lang.Object arg1, java.lang.Object arg2)
           
 
Methods inherited from class gudusoft.gsqlparser.nodes.TParseTreeNode
addAllMyTokensToTokenList, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, init, init, init, setDummyTag, setEndToken, setEndToken, setGsqlparser, setNodeType, setStartToken, setStartToken, setString, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TGroupBy

public TGroupBy()
Method Detail

getHavingClause

public TExpression getHavingClause()
Restrict the groups of returned rows to those groups for which the specified condition is TRUE.

If you omit this clause, then the database returns summary rows for all groups.

Returns:

getItems

public TGroupByItemList getItems()
Returns:
Items in group by clause, can be expr, rollup_cube_clause and grouping_sets_clause.
See Also:
TExpression, TRollupCube, TGroupingSet

init

public void init(java.lang.Object arg1,
                 java.lang.Object arg2)
Overrides:
init in class TParseTreeNode

doParse

public void doParse(TCustomSqlStatement psql,
                    ESqlClause plocation)
Description copied from class: TParseTreeNode
analyze this node

Overrides:
doParse in class TParseTreeNode

accept

public void accept(TParseTreeVisitor v)
Specified by:
accept in interface Visitable
Overrides:
accept in class TParseTreeNode