public class TTable extends TNodeWithAliasClause implements IRelation
getTableType()
can be one of:
tableName
subquery
tableExpr
funcCall
ETableSource.rowList
, it's constructed rows, reference: rowList
containsTable
, type of TContainsTable
containsTable
, type of TContainsTable
openRowSet
, type of TOpenRowSet
openXML
, type of TOpenXML
openDatasource
, type of TOpenDatasource
openquery
, type of (@link TOpenQuery)Modifier and Type | Field and Description |
---|---|
static String |
PIVOT_CLAUSE_ALIAS |
TSelectSqlStatement |
subquery |
static String |
TABLE_COLLECTION_ALIAS |
TTableReferenceList |
tablerefs |
static String |
UNPIVOT_CLAUSE_ALIAS |
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken
Constructor and Description |
---|
TTable() |
TTable(TObjectName pobjectname) |
getAliasClause, setAliasClause
addAllMyTokensToTokenList, addToTokenChain, appendNewNode, calculateTokenCount, doAppendNewNode, doParse, fastSetString, getAnchorNode, getColumnNo, getCommentAfterNode, getCommentBeforeNode, getCompactString, getDummyTag, getEndToken, getEvaluateDatatype, getEvalValue, getGsqlparser, getLineNo, getLocation, getMd5, getNodeStatus, getNodeType, getParentObjectName, getPlainText, getStartToken, getTokenCount, hasNext, 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, toString2
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
public static final String PIVOT_CLAUSE_ALIAS
public static final String UNPIVOT_CLAUSE_ALIAS
public static final String TABLE_COLLECTION_ALIAS
public TSelectSqlStatement subquery
public TTableReferenceList tablerefs
public TTable(TObjectName pobjectname)
public TTable()
public ArrayList<TAttributeNode> getAttributes()
IRelation
getAttributes
in interface IRelation
public String getRelationName()
getRelationName
in interface IRelation
public void setStageReference(TStageReference stageReference)
public TStageReference getStageReference()
public void setTimeTravelClause(TAtBeforeClause timeTravelClause)
public TAtBeforeClause getTimeTravelClause()
public void setCaseJoin(TCaseJoinClause caseJoin)
public TCaseJoinClause getCaseJoin()
public String getStageName()
public void initAttributeForXMLTable()
public void initAttributeForTableFunction()
public void initAttributeForRowList()
public void initAttributesFromCTE(TCTE cte)
public void initAttributesFromSubquery(TSelectSqlStatement subquery, String prefix)
public String getDisplayName()
public void initAttributesForPivotTable()
public void initAttributesForJoin()
public void initAttributesForUnnest(TSQLEnv sqlEnv, TSelectSqlStatement select)
public void addAttribute(TAttributeNode node)
public ArrayList<TObjectName> getAttributesReferenceToThisRelation()
public void setResolvedTable(TSQLTable resolvedTable)
public void setResolved(boolean resolved)
public TSQLTable getResolvedTable()
public boolean isResolved()
public ArrayList<TObjectName> getColumnsFromSQLEnv(TSQLEnv sqlEnv)
public void setJoinExpr(TJoinExpr joinExpr)
public TJoinExpr getJoinExpr()
public void setForXMLClause(TForXMLClause forXMLClause)
public TForXMLClause getForXMLClause()
public TColumnDefinitionList getColumnDefinitions()
public TValueClause getValueClause()
public void setValueClause(TValueClause valueClause)
public void setSourceTableOfPivot(TTable sourceTableOfPivot)
public TTable getSourceTableOfPivot()
public void setJsonTable(TJsonTable jsonTable)
public TJsonTable getJsonTable()
public void setPropertyFromObjectName(TObjectName objectName, ETableEffectType tableEffectType)
public void setTdUnpivot(TTDUnpivot tdUnpivot)
public TTDUnpivot getTdUnpivot()
public void setUnnestClause(TUnnestClause unnestClause)
public TUnnestClause getUnnestClause()
public void setColumnListInTempTable(TResultColumnList columnListInTempTable)
public TResultColumnList getColumnListInTempTable()
public void setPxGranule(TPxGranule pxGranule)
public TPxGranule getPxGranule()
public void setFlashback(TFlashback flashback)
public TFlashback getFlashback()
public void setTableKeyword(boolean tableKeyword)
public void setOnlyKeyword(boolean onlyKeyword)
public boolean isTableKeyword()
public boolean isOnlyKeyword()
public void setParenthesisCount(int parenthesisCount)
public void setParenthesisAfterAliasCount(int parenthesisAfterAliasCount)
public int getParenthesisCount()
public int getParenthesisAfterAliasCount()
public void setOutputMerge(TMergeSqlStatement outputMerge)
public TMergeSqlStatement getOutputMerge()
public void setPivotedTable(TPivotedTable pivotedTable)
public TPivotedTable getPivotedTable()
public void setEffectType(ETableEffectType effectType)
public ETableEffectType getEffectType()
public void setLinkTable(TTable linkTable)
public TTable getLinkTable()
public boolean isLinkTable()
public void setLinkTable(boolean isLinkTable)
setLinkTable(gudusoft.gsqlparser.nodes.TTable)
public String getAliasName()
public boolean equalByName(String pTableName)
public void setTableProperties(TPTNodeList<THiveKeyValueProperty> tableProperties)
public TPTNodeList<THiveKeyValueProperty> getTableProperties()
public void setLateralViewList(ArrayList<TLateralView> lateralViewList)
public ArrayList<TLateralView> getLateralViewList()
public void setTableSample(TTableSample tableSample)
public TTableSample getTableSample()
public void setPartitionExtensionClause(TPartitionExtensionClause partitionExtensionClause)
public TPartitionExtensionClause getPartitionExtensionClause()
public void setOuterClause(TInformixOuterClause outerClause)
public TInformixOuterClause getOuterClause()
public void setFromTableList(TFromTableList fromTableList)
public TFromTableList getFromTableList()
public TXmlTable getXmlTable()
public void setXmlTable(TXmlTable xmlTable)
public void setTableHintList(TPTNodeList<TTableHint> tableHintList)
public TPTNodeList<TTableHint> getTableHintList()
public TOpenQuery getOpenquery()
public TSelectSqlStatement getSubquery()
public void setOpenquery(TOpenQuery openquery)
public void setOpenDatasource(TOpenDatasource openDatasource)
public TOpenDatasource getOpenDatasource()
tableType
is ftt_opendatasource.public void setOpenXML(TOpenXML openXML)
public TOpenXML getOpenXML()
public TOpenRowSet getOpenRowSet()
public void setOpenRowSet(TOpenRowSet openRowSet)
public TContainsTable getContainsTable()
public void setContainsTable(TContainsTable containsTable)
public TFunctionCall getFuncCall()
public void setFuncCall(TFunctionCall funcCall)
public TMultiTargetList getRowList()
getValueClause()
instead
row constructor like this: '(' RW_VALUES MultiTargets ')'public boolean isBaseTable()
public void setCteColomnReferences(TObjectNameList cteColomnReferences)
public TObjectNameList getCteColomnReferences()
public void setObjectNameReferences(TObjectNameList objectNameReferences)
public boolean isCTEName()
public void setCTEName(boolean CTEName)
public void setHiveFromQuery(THiveFromQuery hiveFromQuery)
public THiveFromQuery getHiveFromQuery()
getSubquery()
public TExpression getTableExpr()
public void setTableExpr(TExpression tableExpr)
public void setTableType(ETableSource tableType)
public ETableSource getTableType()
ETableSource.objectname
, in from clause, a simple table/view name, reference: tableName
ETableSource.subquery
, is a subquery that retrieves rows from the database, also known as derived table. reference: subquery
ETableSource.tableExpr
,it's usually a table-valued expression., reference: tableExpr
ETableSource.function
, it's usually a table-valued function., reference: funcCall
ETableSource.rowList
, it's constructed rows, reference: rowList
ETableSource.containsTable
, CONTAINSTABLE clause of sql server. reference: containsTable
, type of TContainsTable
ETableSource.freetextTable
, FREETEXTTABLE clause of sql server. reference: containsTable
, type of TContainsTable
ETableSource.openrowset
, OPENROWSET clause of sql server. reference: openRowSet
, type of TOpenRowSet
ETableSource.openxml
, OPENXML clause of sql server. reference: openXML
, type of TOpenXML
ETableSource.opendatasource
, OPENDATASOURCE clause of sql server. reference: openDatasource
, type of TOpenDatasource
ETableSource.openquery
, OPENQUERY clause of sql server. reference: openquery
, type of (@link TOpenQuery)public void setTableName(TObjectName tableName)
public TObjectName getTableName()
public String getPrefixServer()
public String getPrefixDatabase()
public String getPrefixSchema()
public boolean isIncludeColumnAlias()
public int searchColumnInAlias(TObjectName pColumn)
public boolean checkTableByName(String pTablename)
public boolean searchColumn(TSelectSqlStatement select, String tableName, TObjectName pColumn, boolean pMustIn)
public TObjectNameList getLinkedColumns()
public String getFullNameWithAliasString()
public String getFullName()
public TObjectNameList getObjectNameReferences()
getLinkedColumns()
insteadpublic void setPivotClause(TPivotClause pivotClause)
public TPivotClause getPivotClause()
TPivotedTable
public void setDatachangeTable(TDataChangeTable datachangeTable)
public TDataChangeTable getDatachangeTable()
public boolean isTableRefBelongToThisTable(TTableReference tableref)
public void accept(TParseTreeVisitor v)
TParseTreeNode
accept
in interface Visitable
accept
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor
public void setColumnDefinitions(TColumnDefinitionList columnDefinitions)
public void acceptChildren(TParseTreeVisitor v)
TParseTreeNode
acceptChildren
in interface Visitable
acceptChildren
in class TParseTreeNode
v
- visitor is a descendant class of TParseTreeVisitor
public void setRowList(TMultiTargetList rowList)
public void setSubquery(TSelectSqlStatement subquery)
public void setLinkedColumns(TObjectNameList linkedColumns)
public void setTablerefs(TTableReferenceList tablerefs)
public ArrayList<String> getExpandedStarColumns()
public String toString()
TNodeWithAliasClause
TParseTreeNode
Otherwise, return text of node only, don't include text of alias clause.
If this node was modified by TParseTreeNode.setString(String)
, then node text including alias node
text was replaced by new string.
toString
in class TNodeWithAliasClause