Class SQLSelectQueryBlock
java.lang.Object
com.alibaba.druid.sql.ast.SQLObjectImpl
com.alibaba.druid.sql.ast.statement.SQLSelectQueryBase
com.alibaba.druid.sql.ast.statement.SQLSelectQueryBlock
- All Implemented Interfaces:
SQLDbTypedObject
,SQLObject
,SQLReplaceable
,SQLSelectQuery
- Direct Known Subclasses:
DB2SelectQueryBlock
,MySqlSelectQueryBlock
,OdpsSelectQueryBlock
,OracleSelectQueryBlock
,OscarSelectQueryBlock
,PGSelectQueryBlock
,SQLServerSelectQueryBlock
public class SQLSelectQueryBlock
extends SQLSelectQueryBase
implements SQLReplaceable, SQLDbTypedObject
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected long
protected List<SQLSelectOrderByItem>
protected SQLExpr
protected DbType
protected int
protected List<SQLSelectOrderByItem>
protected boolean
protected boolean
protected SQLTableSource
protected SQLSelectGroupByClause
protected List<SQLCommentHint>
protected SQLExprTableSource
protected SQLLimit
protected boolean
protected boolean
protected SQLOrderBy
protected SQLOrderBy
protected boolean
protected final List<SQLSelectItem>
protected boolean
protected List<SQLSelectOrderByItem>
protected SQLExpr
protected SQLExpr
protected SQLExpr
Fields inherited from class com.alibaba.druid.sql.ast.statement.SQLSelectQueryBase
parenthesized
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
accept0
(SQLASTVisitor visitor) void
void
addCondition
(SQLExpr expr) void
addCondition
(String conditionSql) void
void
void
void
addOrderBy
(SQLExpr orderBy) void
addOrderBy
(SQLExpr orderBy, SQLOrderingSpecification type) void
addOrderBy
(SQLOrderBy orderBy) void
addOrderBy
(SQLSelectOrderByItem orderByItem) addSelectItem
(SQLExpr expr) void
addSelectItem
(SQLExpr expr, String alias) void
addSelectItem
(SQLSelectItem item) void
addSelectItem
(String selectItemExpr, String alias) void
void
void
addWhereForDynamicFilter
(SQLExpr condition) void
boolean
clone()
void
void
boolean
containsOrderBy
(SQLSelectOrderByItem orderByItem) boolean
boolean
findColumn
(long columnNameHash) findColumn
(String columnName) findSelectItem
(long identHash) findSelectItem
(String ident) findTableSource
(String alias) findTableSourceWithColumn
(long columnHash) findTableSourceWithColumn
(String column) long
int
getFirst()
int
getFrom()
getHints()
int
getInto()
getLimit()
getSelectItem
(int i) getWhere()
int
hashCode()
boolean
boolean
boolean
boolean
boolean
boolean
isNoWait()
boolean
isPrior()
boolean
void
limit
(int rowCount, int offset) void
mergeLimit
(SQLLimit limit) boolean
removeCondition
(SQLExpr condition) boolean
removeCondition
(String conditionSql) boolean
boolean
resolveColum
(long columnNameHash) boolean
boolean
selectItemHasAllColumn
(boolean recursive) void
setCachedSelectList
(String cachedSelectList, long cachedSelectListHash) void
setConnectBy
(SQLExpr connectBy) void
void
void
setDistionOption
(int distionOption) void
void
setForShare
(boolean forShare) void
setForUpdate
(boolean forUpdate) void
void
setFrom
(SQLSelectQueryBlock queryBlock, String alias) void
void
setFrom
(SQLTableSource from) void
void
void
setHints
(List<SQLCommentHint> hints) void
void
setInto
(SQLExprTableSource into) void
void
setNoCycle
(boolean noCycle) void
setNoWait
(boolean noWait) void
void
setOrderBy
(SQLOrderBy orderBy) void
setOrderBySiblings
(SQLOrderBy orderBySiblings) void
setPrior
(boolean prior) void
setSkipLocked
(boolean skipLocked) void
setStartWith
(SQLExpr startWith) void
setWaitTime
(SQLExpr waitTime) void
void
Methods inherited from class com.alibaba.druid.sql.ast.statement.SQLSelectQueryBase
isParenthesized, setParenthesized
Methods inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
accept, acceptChild, acceptChild, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, computeDataType, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getHint, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, output, putAttribute, setHint, setParent, setSourceColumn, 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, hasAfterComment, hasBeforeComment, output, output, putAttribute, setParent
-
Field Details
-
distionOption
protected int distionOption -
selectList
-
from
-
into
-
where
-
startWith
-
connectBy
-
prior
protected boolean prior -
noCycle
protected boolean noCycle -
orderBySiblings
-
groupBy
-
windows
-
orderBy
-
forUpdate
protected boolean forUpdate -
noWait
protected boolean noWait -
skipLocked
protected boolean skipLocked -
waitTime
-
limit
-
forUpdateOf
-
distributeBy
-
sortBy
-
clusterBy
-
cachedSelectList
-
cachedSelectListHash
protected long cachedSelectListHash -
dbType
-
hints
-
-
Constructor Details
-
SQLSelectQueryBlock
public SQLSelectQueryBlock() -
SQLSelectQueryBlock
-
-
Method Details
-
getInto
-
setInto
-
setInto
-
getGroupBy
-
setGroupBy
-
getWindows
-
addWindow
-
getWhere
-
setWhere
-
addWhere
-
addWhereForDynamicFilter
-
whereOr
-
addHaving
-
getOrderBy
-
setOrderBy
-
addOrderBy
-
addOrderBy
-
containsOrderBy
-
addOrderBy
-
addOrderBy
-
getOrderBySiblings
-
setOrderBySiblings
-
getDistionOption
public int getDistionOption() -
setDistionOption
public void setDistionOption(int distionOption) -
setDistinct
public void setDistinct() -
isDistinct
public boolean isDistinct() -
getSelectList
-
getSelectItem
-
addSelectItem
-
addSelectItem
-
addSelectItem
-
addSelectItem
-
hasSelectAggregation
public boolean hasSelectAggregation() -
getFrom
-
setFrom
-
setFrom
-
setFrom
-
setFrom
-
setFrom
-
isForUpdate
public boolean isForUpdate() -
setForUpdate
public void setForUpdate(boolean forUpdate) -
isNoWait
public boolean isNoWait() -
setNoWait
public void setNoWait(boolean noWait) -
isSkipLocked
public boolean isSkipLocked() -
setSkipLocked
public void setSkipLocked(boolean skipLocked) -
getWaitTime
-
setWaitTime
-
getLimit
-
setLimit
-
mergeLimit
-
getFirst
-
setFirst
-
getOffset
-
setOffset
-
isPrior
public boolean isPrior() -
setPrior
public void setPrior(boolean prior) -
getStartWith
-
setStartWith
-
getConnectBy
-
setConnectBy
-
isNoCycle
public boolean isNoCycle() -
setNoCycle
public void setNoCycle(boolean noCycle) -
getDistributeBy
-
getDistributeByDirect
-
addDistributeBy
-
addDistributeBy
-
getSortBy
-
getSortByDirect
-
addSortBy
-
accept0
- Specified by:
accept0
in classSQLObjectImpl
-
equals
-
hashCode
public int hashCode() -
equalsForMergeJoin
-
clone
- Specified by:
clone
in interfaceSQLObject
- Specified by:
clone
in interfaceSQLSelectQuery
- Specified by:
clone
in classSQLSelectQueryBase
-
getForUpdateOf
-
getForUpdateOfSize
public int getForUpdateOfSize() -
cloneSelectListTo
-
cloneTo
-
findTableSource
-
findTableSourceWithColumn
-
findTableSourceWithColumn
-
replace
- Specified by:
replace
in interfaceSQLReplaceable
-
findSelectItem
-
findSelectItem
-
selectItemHasAllColumn
public boolean selectItemHasAllColumn() -
selectItemHasAllColumn
public boolean selectItemHasAllColumn(boolean recursive) -
findAllColumnSelectItem
-
findColumn
-
findColumn
-
resolveColum
-
addCondition
-
addCondition
-
removeCondition
-
removeCondition
-
limit
public void limit(int rowCount, int offset) -
getCachedSelectList
-
setCachedSelectList
-
getCachedSelectListHash
public long getCachedSelectListHash() -
getDbType
- Specified by:
getDbType
in interfaceSQLDbTypedObject
-
setDbType
-
getHintsDirect
-
getHints
-
setHints
-
getHintsSize
public int getHintsSize() -
replaceInParent
-
getClusterBy
-
getClusterByDirect
-
addClusterBy
-
computeSelecteListAlias
-
getMappJoinTableSources
-
clearMapJoinHint
public boolean clearMapJoinHint()
-