Class SQLJoinTableSource
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.statement.SQLTableSourceImpl
-
- com.alibaba.druid.sql.ast.statement.SQLJoinTableSource
-
- All Implemented Interfaces:
SQLObject,SQLReplaceable,SQLTableSource
- Direct Known Subclasses:
OracleSelectJoin
public class SQLJoinTableSource extends SQLTableSourceImpl implements SQLReplaceable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSQLJoinTableSource.JoinTypestatic classSQLJoinTableSource.UDJ
-
Field Summary
Fields Modifier and Type Field Description protected booleanasofprotected SQLExprconditionprotected booleanglobalprotected SQLJoinTableSource.JoinTypejoinTypeprotected SQLTableSourceleftprotected booleannaturalprotected SQLTableSourcerightprotected SQLJoinTableSource.UDJudjprotected List<SQLExpr>using-
Fields inherited from class com.alibaba.druid.sql.ast.statement.SQLTableSourceImpl
alias, aliasHashCode64, flashback, hints, needAsTokenForAlias, pivot, unpivot
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLJoinTableSource()SQLJoinTableSource(SQLTableSource left, SQLJoinTableSource.JoinType joinType, SQLTableSource right, SQLExpr condition)SQLJoinTableSource(String alias)
-
Method Summary
-
Methods inherited from class com.alibaba.druid.sql.ast.statement.SQLTableSourceImpl
aliasHashCode64, computeAlias, findTableSource, findTableSourceWithColumn, findTableSourceWithColumn, getAlias, getAlias2, getFlashback, getHints, getHintsSize, getPivot, getUnpivot, isNeedAsTokenForAlias, setAlias, setFlashback, setHints, setNeedAsTokenForAlias, setPivot, setUnpivot
-
Methods inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
accept, acceptChild, acceptChild, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, cloneTo, computeDataType, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getHint, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, putAttribute, setHint, setParent, setSource, setSourceLine, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.alibaba.druid.sql.ast.SQLObject
accept, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, putAttribute, setParent, setSource
-
Methods inherited from interface com.alibaba.druid.sql.ast.statement.SQLTableSource
resolveColum
-
-
-
-
Field Detail
-
left
protected SQLTableSource left
-
joinType
protected SQLJoinTableSource.JoinType joinType
-
right
protected SQLTableSource right
-
condition
protected SQLExpr condition
-
natural
protected boolean natural
-
udj
protected SQLJoinTableSource.UDJ udj
-
asof
protected boolean asof
-
global
protected boolean global
-
-
Constructor Detail
-
SQLJoinTableSource
public SQLJoinTableSource(String alias)
-
SQLJoinTableSource
public SQLJoinTableSource()
-
SQLJoinTableSource
public SQLJoinTableSource(SQLTableSource left, SQLJoinTableSource.JoinType joinType, SQLTableSource right, SQLExpr condition)
-
-
Method Detail
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Overrides:
accept0in classSQLTableSourceImpl
-
getUdj
public SQLJoinTableSource.UDJ getUdj()
-
setUdj
public void setUdj(SQLJoinTableSource.UDJ x)
-
isAsof
public boolean isAsof()
-
setAsof
public void setAsof(boolean asof)
-
getJoinType
public SQLJoinTableSource.JoinType getJoinType()
-
setJoinType
public void setJoinType(SQLJoinTableSource.JoinType joinType)
-
setImplicitJoinToCross
public void setImplicitJoinToCross()
-
getLeft
public SQLTableSource getLeft()
-
setLeft
public void setLeft(SQLTableSource left)
-
getRight
public SQLTableSource getRight()
-
setRight
public void setRight(SQLTableSource right)
-
getCondition
public SQLExpr getCondition()
-
setCondition
public void setCondition(SQLExpr condition)
-
addCondition
public void addCondition(SQLExpr condition)
-
addConditionnIfAbsent
public void addConditionnIfAbsent(SQLExpr condition)
-
containsCondition
public boolean containsCondition(SQLExpr condition)
-
isNatural
public boolean isNatural()
-
setNatural
public void setNatural(boolean natural)
-
output
public void output(StringBuilder buf)
- Specified by:
outputin interfaceSQLObject- Overrides:
outputin classSQLObjectImpl
-
replace
public boolean replace(SQLExpr expr, SQLExpr target)
- Specified by:
replacein interfaceSQLReplaceable
-
replace
public boolean replace(SQLTableSource cmp, SQLTableSource target)
-
cloneTo
public void cloneTo(SQLJoinTableSource x)
-
clone
public SQLJoinTableSource clone()
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLTableSource- Overrides:
clonein classSQLTableSourceImpl
-
reverse
public void reverse()
-
rearrangement
public void rearrangement()
a inner_join (b inner_join c) -< a inner_join b innre_join c
-
contains
public boolean contains(SQLTableSource tableSource, SQLExpr condition)
-
contains
public boolean contains(SQLTableSource tableSource, SQLExpr condition, SQLJoinTableSource.JoinType joinType)
-
findJoin
public SQLJoinTableSource findJoin(SQLTableSource tableSource, SQLJoinTableSource.JoinType joinType)
-
containsAlias
public boolean containsAlias(String alias)
- Specified by:
containsAliasin interfaceSQLTableSource- Overrides:
containsAliasin classSQLTableSourceImpl
-
findColumn
public SQLColumnDefinition findColumn(String columnName)
- Specified by:
findColumnin interfaceSQLTableSource- Overrides:
findColumnin classSQLTableSourceImpl
-
findColumn
public SQLColumnDefinition findColumn(long columnNameHash)
- Specified by:
findColumnin interfaceSQLTableSource- Overrides:
findColumnin classSQLTableSourceImpl
-
resolveColumn
public SQLObject resolveColumn(long columnNameHash)
- Specified by:
resolveColumnin interfaceSQLTableSource- Overrides:
resolveColumnin classSQLTableSourceImpl
-
findTableSourceWithColumn
public SQLTableSource findTableSourceWithColumn(String columnName)
- Specified by:
findTableSourceWithColumnin interfaceSQLTableSource- Overrides:
findTableSourceWithColumnin classSQLTableSourceImpl
-
findTableSourceWithColumn
public SQLJoinTableSource findTableSourceWithColumn(SQLName a, SQLName b)
-
findTableSourceWithColumn
public SQLTableSource findTableSourceWithColumn(long columnNameHash, String name, int option)
- Specified by:
findTableSourceWithColumnin interfaceSQLTableSource- Overrides:
findTableSourceWithColumnin classSQLTableSourceImpl
-
conditionContainsTable
public boolean conditionContainsTable(String alias)
-
join
public SQLJoinTableSource join(SQLTableSource right, SQLJoinTableSource.JoinType joinType, SQLExpr condition)
-
findTableSource
public SQLTableSource findTableSource(long alias_hash)
- Specified by:
findTableSourcein interfaceSQLTableSource- Overrides:
findTableSourcein classSQLTableSourceImpl
-
other
public SQLTableSource other(SQLTableSource x)
-
isGlobal
public boolean isGlobal()
-
setGlobal
public void setGlobal(boolean global)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSQLTableSourceImpl
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classSQLTableSourceImpl
-
splitTo
public void splitTo(List<SQLTableSource> outTableSources, SQLJoinTableSource.JoinType joinType)
-
-