public class TPivotClause extends TNodeWithAliasClause implements IRelation
| Modifier and Type | Field and Description |
|---|---|
static int |
pivot |
static int |
unpivot |
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken| Constructor and Description |
|---|
TPivotClause() |
| 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.
|
TResultColumnList |
getAggregation_function_list() |
TFunctionCall |
getAggregation_function() |
ArrayList<TAttributeNode> |
getAttributes()
每个 relation 包含的 attributes
当它为 base table 时,这些 attributes 的来源有三种可能
1.
|
TObjectNameList |
getColumnList() |
String |
getDisplayName() |
List<String> |
getGeneratedColumnNames()
The names of the columns this operator generates, in text order, duplicates included: for UNPIVOT its value
and FOR columns, for PIVOT the names of its alias column list or one per IN item.
|
List<Boolean> |
getGeneratedColumnStored()
For each name of
getGeneratedColumnNames(), whether it is the column's stored name as written: the
literal of an unaliased IN value in a dialect that names the column after it (IN ('direct') in Oracle
names the column 'direct', referenced as "'direct'"), never an identifier spelling to fold. |
TResultColumnList |
getIn_result_list()
Deprecated.
since 1.7.1.1, use
getPivotInClause() instead |
TObjectName |
getPivotColumn()
Deprecated.
since 1.7.1.1 , use
getPivotColumnList() instead. |
TObjectNameList |
getPivotColumnList() |
TPivotInClause |
getPivotInClause() |
TTable |
getPivotTable() |
String |
getRelationName() |
int |
getType() |
TUnpivotInClause |
getUnpivotInClause() |
TObjectName |
getValueColumn()
Deprecated.
since 1.7.1.1, use
getValueColumnList() instead. |
TObjectNameList |
getValueColumnList() |
void |
init(Object arg1,
Object arg2) |
void |
init(Object arg1,
Object arg2,
Object arg3) |
void |
initAttributes() |
void |
setAggregation_function_list(TResultColumnList aggregation_function_list) |
void |
setAggregation_function(TFunctionCall aggregation_function) |
void |
setColumnList(TObjectNameList columnList) |
void |
setPivotColumnList(TObjectNameList pivotColumnList) |
void |
setPivotInClause(TPivotInClause pivotInClause) |
void |
setType(int type) |
void |
setUnpivotInClause(TUnpivotInClause unpivotInClause) |
void |
setValueColumnList(TObjectNameList valueColumnList) |
int |
size() |
getAliasClause, setAliasClause, toStringaddAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, commentBlockAfter, commentBlockEndAfter, doAppendNewNode, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCommentBeforeNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getParentObjectName, getPlainText, getStartToken, getTokenCount, hasNext, init, init, init, init, init, init, init, init, insertAfterAToken, insertNewNodeBeforeMe, isChanged, isTokensInChain, next, refreshAllNodesTokenCount, remove, removeAllMyTokensFromTokenList, removeTokens, removeTokensBetweenNodes, removeTokensBetweenToken, replaceWithNewNode, resetIterator, setAnchorNode, setChanged, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setEndToken, setEndTokenDirectly, setEvaluateDatatype, setEvalValue, setGsqlparser, setIncludingComment, setLocation, setNewSubNode, setNodeStatus, setNodeType, setParent, setPlainText, setStartToken, setStartToken, setStartToken, setStartToken, setStartTokenDirectly, setString, setString2, subNodeInNode, toScript, toString2clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingpublic static final int pivot
public static final int unpivot
public TPivotClause()
public ArrayList<TAttributeNode> getAttributes()
IRelationgetAttributes in interface IRelationpublic String getRelationName()
getRelationName in interface IRelationpublic String getDisplayName()
public void initAttributes()
public TTable getPivotTable()
public List<String> getGeneratedColumnNames()
PivotNamespace.generatedColumnNames), so a consumer that publishes a pivot's columns names them as
a reference to them is resolved (plan 09 slice 10).public List<Boolean> getGeneratedColumnStored()
getGeneratedColumnNames(), whether it is the column's stored name as written: the
literal of an unaliased IN value in a dialect that names the column after it (IN ('direct') in Oracle
names the column 'direct', referenced as "'direct'"), never an identifier spelling to fold.public TPivotInClause getPivotInClause()
public TUnpivotInClause getUnpivotInClause()
public TObjectNameList getPivotColumnList()
public TResultColumnList getIn_result_list()
getPivotInClause() insteadpublic TResultColumnList getAggregation_function_list()
public void setType(int type)
public int getType()
public TObjectNameList getValueColumnList()
public TFunctionCall getAggregation_function()
public TObjectNameList getColumnList()
public TObjectName getPivotColumn()
getPivotColumnList() instead.public TObjectName getValueColumn()
getValueColumnList() instead.public void init(Object arg1, Object arg2)
init in class TParseTreeNodepublic void init(Object arg1, Object arg2, Object arg3)
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 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 setPivotInClause(TPivotInClause pivotInClause)
public void setUnpivotInClause(TUnpivotInClause unpivotInClause)
public void setAggregation_function_list(TResultColumnList aggregation_function_list)
public void setPivotColumnList(TObjectNameList pivotColumnList)
public void setAggregation_function(TFunctionCall aggregation_function)
public void setValueColumnList(TObjectNameList valueColumnList)
public void setColumnList(TObjectNameList columnList)