Class SQLUpdateStatement
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.SQLStatementImpl
-
- com.alibaba.druid.sql.ast.statement.SQLUpdateStatement
-
- All Implemented Interfaces:
SQLDbTypedObject,SQLObject,SQLReplaceable,SQLStatement
- Direct Known Subclasses:
MySqlUpdateStatement,OracleUpdateStatement,OscarUpdateStatement,PGUpdateStatement,SQLServerUpdateStatement
public class SQLUpdateStatement extends SQLStatementImpl implements SQLReplaceable
-
-
Field Summary
Fields Modifier and Type Field Description protected SQLTableSourcefromprotected List<SQLUpdateSetItem>itemsprotected SQLLimitlimitprotected SQLOrderByorderByprotected List<SQLAssignItem>partitionsprotected List<SQLExpr>returningprotected SQLTableSourcetableSourceprotected SQLExprwhereprotected SQLWithSubqueryClausewith-
Fields inherited from class com.alibaba.druid.sql.ast.SQLStatementImpl
afterSemi, dbType, headHints
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLUpdateStatement()SQLUpdateStatement(DbType dbType)
-
Method Summary
-
Methods inherited from class com.alibaba.druid.sql.ast.SQLStatementImpl
cloneTo, getDbType, getHeadHintsDirect, isAfterSemi, setAfterSemi, setDbType, setHeadHints, toLowerCaseString, toParameterizedString, toString, toString, toUnformattedString
-
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, output, putAttribute, setHint, setParent, setSource, setSourceLine
-
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, output, putAttribute, setParent, setSource
-
-
-
-
Field Detail
-
with
protected SQLWithSubqueryClause with
-
items
protected final List<SQLUpdateSetItem> items
-
where
protected SQLExpr where
-
limit
protected SQLLimit limit
-
from
protected SQLTableSource from
-
tableSource
protected SQLTableSource tableSource
-
partitions
protected List<SQLAssignItem> partitions
-
orderBy
protected SQLOrderBy orderBy
-
-
Constructor Detail
-
SQLUpdateStatement
public SQLUpdateStatement()
-
SQLUpdateStatement
public SQLUpdateStatement(DbType dbType)
-
-
Method Detail
-
getLimit
public SQLLimit getLimit()
-
setLimit
public void setLimit(SQLLimit limit)
-
cloneTo
public void cloneTo(SQLUpdateStatement x)
-
clone
public SQLUpdateStatement clone()
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLStatement- Overrides:
clonein classSQLStatementImpl
-
getTableSource
public SQLTableSource getTableSource()
-
setTableSource
public void setTableSource(SQLExpr expr)
-
setTableSource
public void setTableSource(SQLTableSource tableSource)
-
getTableName
public SQLName getTableName()
-
getTableName
public SQLName getTableName(boolean lastFlag)
-
getPartitions
public List<SQLAssignItem> getPartitions()
-
setPartitions
public void setPartitions(List<SQLAssignItem> partitions)
-
getWhere
public SQLExpr getWhere()
-
setWhere
public void setWhere(SQLExpr where)
-
getItems
public List<SQLUpdateSetItem> getItems()
-
addItem
public void addItem(SQLUpdateSetItem item)
-
getFrom
public SQLTableSource getFrom()
-
setFrom
public void setFrom(SQLTableSource from)
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Overrides:
accept0in classSQLStatementImpl
-
acceptChild
protected void acceptChild(SQLASTVisitor visitor)
-
getChildren
public List<SQLObject> getChildren()
- Specified by:
getChildrenin interfaceSQLStatement- Overrides:
getChildrenin classSQLStatementImpl
-
replace
public boolean replace(SQLExpr expr, SQLExpr target)
- Specified by:
replacein interfaceSQLReplaceable
-
getOrderBy
public SQLOrderBy getOrderBy()
-
setOrderBy
public void setOrderBy(SQLOrderBy orderBy)
-
getWith
public SQLWithSubqueryClause getWith()
-
setWith
public void setWith(SQLWithSubqueryClause with)
-
addCondition
public void addCondition(String conditionSql)
-
addCondition
public void addCondition(SQLExpr expr)
-
removeCondition
public boolean removeCondition(String conditionSql)
-
removeCondition
public boolean removeCondition(SQLExpr condition)
-
addWhere
public boolean addWhere(SQLExpr where)
-
-