gudusoft.gsqlparser.nodes
Class TPivotClause

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

public class TPivotClause
extends TNodeWithAliasClause

use the PIVOT and UNPIVOT relational operators to change a table-valued expression into another table.


Field Summary
static int pivot
           
static int unpivot
           
 
Constructor Summary
TPivotClause()
           
 
Method Summary
 void accept(TParseTreeVisitor v)
           
 void doParse(TCustomSqlStatement psql, ESqlClause plocation)
          analyze this node
 TFunctionCall getAggregation_function()
           
 TObjectNameList getColumnList()
           
 TObjectName getPrivotColumn()
           
 int getType()
           
 TObjectName getValueColumn()
           
 void init(java.lang.Object arg1, java.lang.Object arg2)
           
 void setType(int type)
           
 
Methods inherited from class gudusoft.gsqlparser.nodes.TNodeWithAliasClause
getAliasClause, setAliasClause, toString
 
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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

pivot

public static final int pivot
See Also:
Constant Field Values

unpivot

public static final int unpivot
See Also:
Constant Field Values
Constructor Detail

TPivotClause

public TPivotClause()
Method Detail

setType

public void setType(int type)

getType

public int getType()

getAggregation_function

public TFunctionCall getAggregation_function()
Returns:
Is a system or user-defined aggregate function that accepts one or more inputs.

getColumnList

public TObjectNameList getColumnList()
Returns:
In the PIVOT clause, lists the values in the pivot_column that will become the column names of the output table. The list cannot specify any column names that already exist in the input table_source that is being pivoted. In the UNPIVOT clause, lists the columns in table_source that will be narrowed into a single pivot_column.

getPrivotColumn

public TObjectName getPrivotColumn()
Returns:
Is the pivot column of the PIVOT operator.

getValueColumn

public TObjectName getValueColumn()
Returns:
Is the value column of the PIVOT operator. When used with UNPIVOT, value_column cannot be the name of an existing column in the input table_source.

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