Class SQLDeleteStatement
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.SQLStatementImpl
-
- com.alibaba.druid.sql.ast.statement.SQLDeleteStatement
-
- All Implemented Interfaces:
SQLDbTypedObject,SQLObject,SQLReplaceable,SQLStatement
- Direct Known Subclasses:
MySqlDeleteStatement,OracleDeleteStatement,OscarDeleteStatement,PGDeleteStatement
public class SQLDeleteStatement extends SQLStatementImpl implements SQLReplaceable
-
-
Field Summary
Fields Modifier and Type Field Description protected SQLTableSourcefromprotected booleanonlyprotected SQLTableSourcetableSourceprotected SQLTableSourceusingprotected 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 SQLDeleteStatement()SQLDeleteStatement(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
equals, finalize, getClass, hashCode, 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
-
tableSource
protected SQLTableSource tableSource
-
where
protected SQLExpr where
-
from
protected SQLTableSource from
-
using
protected SQLTableSource using
-
only
protected boolean only
-
-
Constructor Detail
-
SQLDeleteStatement
public SQLDeleteStatement()
-
SQLDeleteStatement
public SQLDeleteStatement(DbType dbType)
-
-
Method Detail
-
cloneTo
protected void cloneTo(SQLDeleteStatement x)
-
clone
public SQLDeleteStatement clone()
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLStatement- Overrides:
clonein classSQLStatementImpl
-
getTableSource
public SQLTableSource getTableSource()
-
getExprTableSource
public SQLExprTableSource getExprTableSource()
-
setTableSource
public void setTableSource(SQLExpr expr)
-
setTableSource
public void setTableSource(SQLTableSource tableSource)
-
getTableName
public SQLName getTableName()
-
setTableName
public void setTableName(SQLName tableName)
-
setTableName
public void setTableName(String name)
-
getWhere
public SQLExpr getWhere()
-
setWhere
public void setWhere(SQLExpr where)
-
getAlias
public String getAlias()
-
setAlias
public void setAlias(String alias)
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Overrides:
accept0in classSQLStatementImpl
-
getChildren
public List<SQLObject> getChildren()
- Specified by:
getChildrenin interfaceSQLStatement- Overrides:
getChildrenin classSQLStatementImpl
-
getFrom
public SQLTableSource getFrom()
-
setFrom
public void setFrom(SQLTableSource from)
-
replace
public boolean replace(SQLExpr expr, SQLExpr target)
- Specified by:
replacein interfaceSQLReplaceable
-
isOnly
public boolean isOnly()
-
setOnly
public void setOnly(boolean only)
-
getUsing
public SQLTableSource getUsing()
-
setUsing
public void setUsing(SQLTableSource using)
-
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)
-
-