public class TGroupBy extends TParseTreeNode
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 and Description |
|---|
TGroupBy() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(TParseTreeVisitor v)
Accept a visitor
|
void |
acceptChildren(TParseTreeVisitor v)
Accept a visitor to iterate this class and sub-nodes of this class
|
void |
doParse(TCustomSqlStatement psql,
ESqlClause plocation)
Analyze the sub-nodes inside this node.
|
TPTNodeList<TBinding> |
getBindings() |
TSourceToken |
getBY() |
TSourceToken |
getGROUP() |
TSourceToken |
getHAVING() |
TExpression |
getHavingClause()
Restrict the groups of returned rows to those groups for which the specified condition is TRUE.
|
TGroupByItemList |
getItems() |
void |
init(Object arg1)
Initialize a query tree node.
|
void |
init(Object arg1,
Object arg2) |
boolean |
isRollupModifier() |
void |
setBindings(TPTNodeList<TBinding> bindings) |
void |
setBY(TSourceToken BY) |
void |
setGROUP(TSourceToken GROUP) |
void |
setHAVING(TSourceToken HAVING) |
void |
setHavingClause(TExpression havingClause) |
void |
setItems(TGroupByItemList items) |
void |
setRollupModifier(boolean rollupModifier) |
addAllMyTokensToTokenList, appendString, fastSetString, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, init, init, removeAllMyTokensFromTokenList, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setGsqlparser, setIncludingComment, setNodeType, setStartToken, setStartToken, setStartToken, setStartToken, setString, toScript, toStringpublic TPTNodeList<TBinding> getBindings()
public void setRollupModifier(boolean rollupModifier)
public boolean isRollupModifier()
public void setBY(TSourceToken BY)
public void setGROUP(TSourceToken GROUP)
public void setHAVING(TSourceToken HAVING)
public TSourceToken getBY()
public TSourceToken getGROUP()
public TSourceToken getHAVING()
public TExpression getHavingClause()
If you omit this clause, then the database returns summary rows for all groups.
public TGroupByItemList getItems()
TExpression,
TRollupCube,
TGroupingSetpublic void setHavingClause(TExpression havingClause)
public void init(Object arg1)
TParseTreeNodeinit in class TParseTreeNodearg1 - first argumentpublic void init(Object arg1, Object arg2)
init in class TParseTreeNodepublic void doParse(TCustomSqlStatement psql, ESqlClause plocation)
TParseTreeNodedoParse in class TParseTreeNodepsql - SQL statement this node belongs toplocation - SQL clause this node belongs topublic void setBindings(TPTNodeList<TBinding> bindings)
public void accept(TParseTreeVisitor v)
TParseTreeNodeaccept in interface Visitableaccept in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitorpublic void acceptChildren(TParseTreeVisitor v)
TParseTreeNodeacceptChildren in interface VisitableacceptChildren in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitorpublic void setItems(TGroupByItemList items)
Copyright © 2019. All rights reserved.