gudusoft.gsqlparser.nodes
Class TPivotClause
java.lang.Object
gudusoft.gsqlparser.nodes.TParseTreeNode
gudusoft.gsqlparser.nodes.TNodeWithAliasClause
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.
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 |
pivot
public static final int pivot
- See Also:
- Constant Field Values
unpivot
public static final int unpivot
- See Also:
- Constant Field Values
TPivotClause
public TPivotClause()
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