Class SQLUnique
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.statement.SQLConstraintImpl
-
- com.alibaba.druid.sql.ast.statement.SQLUnique
-
- All Implemented Interfaces:
SQLDbTypedObject,SQLObject,SQLConstraint,SQLTableElement,SQLUniqueConstraint
- Direct Known Subclasses:
MySqlKey,OracleUnique,SQLPrimaryKeyImpl,StarRocksAggregateKey,StarRocksDuplicateKey
public class SQLUnique extends SQLConstraintImpl implements SQLUniqueConstraint, SQLTableElement
-
-
Field Summary
Fields Modifier and Type Field Description protected booleandisableNovalidateprotected SQLIndexDefinitionindexDefinition-
Fields inherited from class com.alibaba.druid.sql.ast.statement.SQLConstraintImpl
dbType, enable, hints, rely, validate
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLUnique()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaccept0(SQLASTVisitor visitor)voidaddColumn(SQLExpr column)voidaddColumn(SQLSelectOrderByItem column)booleanapplyColumnRename(SQLName columnName, SQLColumnDefinition to)booleanapplyDropColumn(SQLName columnName)SQLUniqueclone()voidcloneTo(SQLUnique x)booleancontainsColumn(long columnNameHash)booleancontainsColumn(String column)List<SQLSelectOrderByItem>getColumns()SQLExprgetComment()List<SQLName>getCovering()SQLIndexDefinitiongetIndexDefinition()SQLNamegetName()booleanisDisableNovalidate()voidsetComment(SQLExpr x)voidsetDisableNovalidate(boolean disableNovalidate)voidsetName(SQLName name)voidsetName(String name)voidsimplify()-
Methods inherited from class com.alibaba.druid.sql.ast.statement.SQLConstraintImpl
cloneTo, cloneTo, getDbType, getEnable, getHints, getRely, getValidate, replace, setDbType, setEnable, setHints, setRely, setValidate
-
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, toString
-
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.statement.SQLConstraint
setHasConstraint
-
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
-
indexDefinition
protected final SQLIndexDefinition indexDefinition
-
disableNovalidate
protected boolean disableNovalidate
-
-
Method Detail
-
getName
public SQLName getName()
- Specified by:
getNamein interfaceSQLConstraint- Overrides:
getNamein classSQLConstraintImpl
-
setName
public void setName(SQLName name)
- Specified by:
setNamein interfaceSQLConstraint- Overrides:
setNamein classSQLConstraintImpl
-
setName
public void setName(String name)
- Overrides:
setNamein classSQLConstraintImpl
-
isDisableNovalidate
public boolean isDisableNovalidate()
-
setDisableNovalidate
public void setDisableNovalidate(boolean disableNovalidate)
-
getComment
public SQLExpr getComment()
- Specified by:
getCommentin interfaceSQLConstraint- Overrides:
getCommentin classSQLConstraintImpl
-
setComment
public void setComment(SQLExpr x)
- Specified by:
setCommentin interfaceSQLConstraint- Overrides:
setCommentin classSQLConstraintImpl
-
getIndexDefinition
public SQLIndexDefinition getIndexDefinition()
-
getColumns
public List<SQLSelectOrderByItem> getColumns()
- Specified by:
getColumnsin interfaceSQLUniqueConstraint
-
addColumn
public void addColumn(SQLExpr column)
-
addColumn
public void addColumn(SQLSelectOrderByItem column)
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Specified by:
accept0in classSQLObjectImpl
-
containsColumn
public boolean containsColumn(String column)
- Specified by:
containsColumnin interfaceSQLUniqueConstraint
-
containsColumn
public boolean containsColumn(long columnNameHash)
- Specified by:
containsColumnin interfaceSQLUniqueConstraint
-
cloneTo
public void cloneTo(SQLUnique x)
-
clone
public SQLUnique clone()
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLTableElement- Overrides:
clonein classSQLObjectImpl
-
simplify
public void simplify()
- Specified by:
simplifyin interfaceSQLConstraint- Overrides:
simplifyin classSQLConstraintImpl
-
applyColumnRename
public boolean applyColumnRename(SQLName columnName, SQLColumnDefinition to)
-
applyDropColumn
public boolean applyDropColumn(SQLName columnName)
-
-