TJoinExpr instead.
A list of join TCustomSqlStatement.joins represents table sources in following clauses of SQL statement:
TJoin.
public class TJoin extends TNodeWithAliasClause
dbvendor, doubleLinkedTokenListToString, nodeActionAppend, nodeActionInsert, nodeActionRemove, nodeActionUnknown, nodeActionUpdate, nodeActionUpdateText, nodeChangeEndToken, nodeChangeStartToken| Constructor and Description |
|---|
TJoin()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(TParseTreeVisitor v)
Deprecated.
Accept a visitor
|
void |
acceptChildren(TParseTreeVisitor v)
Deprecated.
Accept a visitor to iterate this class and sub-nodes of this class
|
TAliasClause |
getAliasClause()
Deprecated.
|
TJoin |
getJoin()
Deprecated.
|
TJoinItemList |
getJoinItems()
Deprecated.
List of joinItems.
|
int |
getKind()
Deprecated.
According to the table source in from clause, there are 3 kinds of join.
|
int |
getNestedParen()
Deprecated.
|
TTable |
getTable()
Deprecated.
|
boolean |
isWithParen()
Deprecated.
|
void |
setJoin(TJoin join)
Deprecated.
|
void |
setJoinItems(TJoinItemList joinItems)
Deprecated.
|
void |
setKind(int kind)
Deprecated.
|
void |
setNestedParen(int nestedParen)
Deprecated.
|
void |
setTable(TTable table)
Deprecated.
|
void |
setWithParen(boolean withParen)
Deprecated.
|
setAliasClause, toStringaddAllMyTokensToTokenList, 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, toString2clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemainingpublic TJoin()
public void setNestedParen(int nestedParen)
public int getNestedParen()
public void setWithParen(boolean withParen)
public boolean isWithParen()
public void setJoinItems(TJoinItemList joinItems)
public void setKind(int kind)
public TJoinItemList getJoinItems()
SQL 1:
select f from t1 left join t2 on t1.f1 = t2.f1 right join t3 on t1.f1 = t3.f1Text in Item 0 will be: left join t2 on t1.f1 = t2.f1
Text in Item 1 will be: right join t3 on t1.f1 = t3.f1
Check TJoinItem to see how information was organized.
public TJoin getJoin()
select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1) as a_join join b on a_join.f1 = b.f1;
public TTable getTable()
select f from t1 join t2 on t1.f1 = t2.f1
public int getKind()
TBaseType.join_source_fake, it's a fake join like select f from t1the whole from clause was represented by this class, you can get text representation of this from clause by using toString() method, it returns "t1" . and table t1 can be fetch from
getTable().TBaseType.join_source_table,select f from t1 join t2 on t1.f1 = t2.f1the whole from clause was represented by this class, you can get text representation of this from clause by using toString() method, it returns "t1 join t2 on t1.f1 = t2.f1". t1 can be fetch from
getTable().TBaseType.join_source_join,
select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1) as a_join join b on a_join.f1 = b.f1;the whole from clause was represented by this class, you can get text representation of this from clause by using toString() method, it returns "(a as a_alias left join a1 on a1.f1 = a_alias.f1) as a_join join b on a_join.f1 = b.f1".
(a as a_alias left join a1 on a1.f1 = a_alias.f1) can be fetched from getJoin().
public TAliasClause getAliasClause()
getAliasClause in class TNodeWithAliasClausegetJoin(), valid only when = TBaseType#join_source_join.
In this SQL, alias is "as a_join"
select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1) as a_join join b on a_join.f1 = b.f1;
But in this SQL, alias is null, "as t1" is the alias of t1.
select f from t as t1 join t2 on t1.f1 = t2.f1
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 TParseTreeVisitor