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 Stringprotected longprotected List<SQLSelectOrderByItem>protected SQLExprprotected DbTypeprotected intprotected List<SQLSelectOrderByItem>protected booleanprotected booleanprotected SQLTableSourceprotected SQLSelectGroupByClauseprotected List<SQLCommentHint>protected SQLExprTableSourceprotected SQLLimitprotected booleanprotected booleanprotected SQLOrderByprotected SQLOrderByprotected booleanprotected SQLExprprotected final List<SQLSelectItem>protected booleanprotected List<SQLSelectOrderByItem>protected SQLExprprotected SQLExprprotected SQLExprFields inherited from class com.alibaba.druid.sql.ast.statement.SQLSelectQueryBase
parenthesizedFields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaccept0(SQLASTVisitor visitor) voidvoidaddCondition(SQLExpr expr) voidaddCondition(String conditionSql) voidvoidvoidvoidaddOrderBy(SQLExpr orderBy) voidaddOrderBy(SQLExpr orderBy, SQLOrderingSpecification type) voidaddOrderBy(SQLOrderBy orderBy) voidaddOrderBy(SQLSelectOrderByItem orderByItem) addSelectItem(SQLExpr expr) voidaddSelectItem(SQLExpr expr, String alias) voidaddSelectItem(SQLSelectItem item) voidaddSelectItem(String selectItemExpr, String alias) voidvoidvoidaddWhereForDynamicFilter(SQLExpr condition) voidbooleanclone()voidvoidbooleancontainsOrderBy(SQLSelectOrderByItem orderByItem) booleanbooleanfindColumn(long columnNameHash) findColumn(String columnName) findSelectItem(long identHash) findSelectItem(String ident) findTableSource(String alias) findTableSourceWithColumn(long columnHash) findTableSourceWithColumn(String column) longintgetFirst()intgetFrom()getHints()intgetInto()getLimit()getSelectItem(int i) getWhere()inthashCode()booleanbooleanbooleanbooleanbooleanbooleanisNoWait()booleanisPrior()booleanvoidlimit(int rowCount, int offset) voidmergeLimit(SQLLimit limit) booleanremoveCondition(SQLExpr condition) booleanremoveCondition(String conditionSql) booleanbooleanresolveColum(long columnNameHash) booleanbooleanselectItemHasAllColumn(boolean recursive) voidsetCachedSelectList(String cachedSelectList, long cachedSelectListHash) voidsetConnectBy(SQLExpr connectBy) voidvoidvoidsetDistionOption(int distionOption) voidvoidsetForShare(boolean forShare) voidsetForUpdate(boolean forUpdate) voidvoidsetFrom(SQLSelectQueryBlock queryBlock, String alias) voidvoidsetFrom(SQLTableSource from) voidvoidvoidsetHints(List<SQLCommentHint> hints) voidvoidsetInto(SQLExprTableSource into) voidvoidsetNoCycle(boolean noCycle) voidsetNoWait(boolean noWait) voidvoidsetOrderBy(SQLOrderBy orderBy) voidsetOrderBySiblings(SQLOrderBy orderBySiblings) voidsetPrior(boolean prior) voidvoidsetSkipLocked(boolean skipLocked) voidsetStartWith(SQLExpr startWith) voidsetWaitTime(SQLExpr waitTime) voidvoidMethods inherited from class com.alibaba.druid.sql.ast.statement.SQLSelectQueryBase
isParenthesized, setParenthesizedMethods 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, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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
-
qualify
-
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
-
getQualify
-
setQualify
-
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:
accept0in classSQLObjectImpl
-
equals
-
hashCode
public int hashCode() -
equalsForMergeJoin
-
clone
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLSelectQuery- Specified by:
clonein classSQLSelectQueryBase
-
getForUpdateOf
-
getForUpdateOfSize
public int getForUpdateOfSize() -
cloneSelectListTo
-
cloneTo
-
findTableSource
-
findTableSourceWithColumn
-
findTableSourceWithColumn
-
replace
- Specified by:
replacein 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:
getDbTypein interfaceSQLDbTypedObject
-
setDbType
-
getHintsDirect
-
getHints
-
setHints
-
getHintsSize
public int getHintsSize() -
replaceInParent
-
getClusterBy
-
getClusterByDirect
-
addClusterBy
-
computeSelecteListAlias
-
getMappJoinTableSources
-
clearMapJoinHint
public boolean clearMapJoinHint()
-