Class SQLColumnDefinition
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.statement.SQLColumnDefinition
-
- All Implemented Interfaces:
SQLDbTypedObject,SQLObject,SQLObjectWithDataType,SQLReplaceable,SQLTableElement
public class SQLColumnDefinition extends SQLObjectImpl implements SQLTableElement, SQLObjectWithDataType, SQLReplaceable, SQLDbTypedObject
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSQLColumnDefinition.Identity
-
Field Summary
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLColumnDefinition()SQLColumnDefinition(SQLName name)SQLColumnDefinition(String name, SQLDataType dataType)
-
Method Summary
-
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
-
dbType
protected DbType dbType
-
ifNotExists
protected boolean ifNotExists
-
name
protected SQLName name
-
dataType
protected SQLDataType dataType
-
defaultExpr
protected SQLExpr defaultExpr
-
constraints
protected final List<SQLColumnConstraint> constraints
-
disableNovalidate
protected boolean disableNovalidate
-
comment
protected SQLExpr comment
-
enable
protected Boolean enable
-
validate
protected Boolean validate
-
rely
protected Boolean rely
-
autoIncrement
protected boolean autoIncrement
-
onUpdate
protected SQLExpr onUpdate
-
format
protected SQLExpr format
-
storage
protected SQLExpr storage
-
charsetExpr
protected SQLExpr charsetExpr
-
collateExpr
protected SQLExpr collateExpr
-
asExpr
protected SQLExpr asExpr
-
stored
protected boolean stored
-
virtual
protected boolean virtual
-
visible
protected boolean visible
-
sequenceType
protected AutoIncrementType sequenceType
-
preSort
protected boolean preSort
-
preSortOrder
protected int preSortOrder
-
identity
protected SQLColumnDefinition.Identity identity
-
generatedAlwaysAs
protected SQLExpr generatedAlwaysAs
-
delimiter
protected SQLExpr delimiter
-
delimiterTokenizer
protected SQLExpr delimiterTokenizer
-
nlpTokenizer
protected SQLExpr nlpTokenizer
-
valueType
protected SQLExpr valueType
-
disableIndex
protected boolean disableIndex
-
jsonIndexAttrsExpr
protected SQLExpr jsonIndexAttrsExpr
-
annIndex
protected SQLAnnIndex annIndex
-
aggType
protected SQLCharExpr aggType
-
bitmap
protected SQLCharExpr bitmap
-
indexComment
protected SQLCharExpr indexComment
-
blockSize
protected SQLIntegerExpr blockSize
-
-
Constructor Detail
-
SQLColumnDefinition
public SQLColumnDefinition()
-
SQLColumnDefinition
public SQLColumnDefinition(SQLName name)
-
SQLColumnDefinition
public SQLColumnDefinition(String name, SQLDataType dataType)
-
-
Method Detail
-
getIndexComment
public SQLCharExpr getIndexComment()
-
setIndexComment
public void setIndexComment(SQLCharExpr indexComment)
-
getBitmap
public SQLCharExpr getBitmap()
-
setBitmap
public void setBitmap(SQLCharExpr bitmap)
-
getAggType
public SQLCharExpr getAggType()
-
setAggType
public void setAggType(SQLCharExpr aggType)
-
getIdentity
public SQLColumnDefinition.Identity getIdentity()
-
setIdentity
public void setIdentity(SQLColumnDefinition.Identity identity)
-
getEnable
public Boolean getEnable()
-
setEnable
public void setEnable(Boolean enable)
-
getValidate
public Boolean getValidate()
-
setValidate
public void setValidate(Boolean validate)
-
getRely
public Boolean getRely()
-
setRely
public void setRely(Boolean rely)
-
isIfNotExists
public boolean isIfNotExists()
-
setIfNotExists
public void setIfNotExists(boolean ifNotExists)
-
getName
public SQLName getName()
-
getColumnName
public String getColumnName()
-
nameHashCode64
public long nameHashCode64()
-
getNameAsString
public String getNameAsString()
-
setName
public void setName(SQLName name)
-
setName
public void setName(String name)
-
getDataType
public SQLDataType getDataType()
- Specified by:
getDataTypein interfaceSQLObjectWithDataType
-
jdbcType
public int jdbcType()
-
setDataType
public void setDataType(SQLDataType dataType)
- Specified by:
setDataTypein interfaceSQLObjectWithDataType
-
getDefaultExpr
public SQLExpr getDefaultExpr()
-
setDefaultExpr
public void setDefaultExpr(SQLExpr defaultExpr)
-
getConstraints
public List<SQLColumnConstraint> getConstraints()
-
isPrimaryKey
public boolean isPrimaryKey()
-
isOnlyPrimaryKey
public boolean isOnlyPrimaryKey()
-
isPartitionBy
public boolean isPartitionBy()
-
addConstraint
public void addConstraint(SQLColumnConstraint constraint)
-
isDisableNovalidate
public boolean isDisableNovalidate()
-
setDisableNovalidate
public void setDisableNovalidate(boolean disableNovalidate)
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Specified by:
accept0in classSQLObjectImpl
-
getComment
public SQLExpr getComment()
-
setComment
public void setComment(String comment)
-
setComment
public void setComment(SQLExpr comment)
-
isVirtual
public boolean isVirtual()
-
setVirtual
public void setVirtual(boolean virtual)
-
isStored
public boolean isStored()
-
setStored
public void setStored(boolean stored)
-
getCharsetExpr
public SQLExpr getCharsetExpr()
-
setCharsetExpr
public void setCharsetExpr(SQLExpr charsetExpr)
-
getCollateExpr
public SQLExpr getCollateExpr()
-
setCollateExpr
public void setCollateExpr(SQLExpr x)
-
getAsExpr
public SQLExpr getAsExpr()
-
setAsExpr
public void setAsExpr(SQLExpr asExpr)
-
isAutoIncrement
public boolean isAutoIncrement()
-
setAutoIncrement
public void setAutoIncrement(boolean autoIncrement)
-
getOnUpdate
public SQLExpr getOnUpdate()
-
setOnUpdate
public void setOnUpdate(SQLExpr onUpdate)
-
getFormat
public SQLExpr getFormat()
-
setFormat
public void setFormat(SQLExpr format)
-
getStorage
public SQLExpr getStorage()
-
setStorage
public void setStorage(SQLExpr storage)
-
replace
public boolean replace(SQLExpr expr, SQLExpr target)
- Specified by:
replacein interfaceSQLReplaceable
-
setUnitCount
public void setUnitCount(SQLExpr unitCount)
-
isGenerateByDefault
public boolean isGenerateByDefault()
-
setGenerateByDefault
public void setGenerateByDefault(boolean generateByDefault)
-
computeAlias
public String computeAlias()
-
clone
public SQLColumnDefinition clone()
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLTableElement- Overrides:
clonein classSQLObjectImpl
-
getDbType
public DbType getDbType()
- Specified by:
getDbTypein interfaceSQLDbTypedObject
-
setDbType
public void setDbType(DbType dbType)
-
simplify
public void simplify()
-
containsNotNullConstaint
@Deprecated public boolean containsNotNullConstaint()
Deprecated.
-
containsNotNullConstraint
public boolean containsNotNullConstraint()
-
getGeneratedAlwaysAs
public SQLExpr getGeneratedAlwaysAs()
-
setGeneratedAlwaysAs
public void setGeneratedAlwaysAs(SQLExpr x)
-
isVisible
public boolean isVisible()
-
setVisible
public void setVisible(boolean visible)
-
getDelimiter
public SQLExpr getDelimiter()
-
isDisableIndex
public boolean isDisableIndex()
-
setDisableIndex
public void setDisableIndex(boolean disableIndex)
-
setDelimiter
public void setDelimiter(SQLExpr x)
-
getDelimiterTokenizer
public SQLExpr getDelimiterTokenizer()
-
setDelimiterTokenizer
public void setDelimiterTokenizer(SQLExpr delimiterTokenizer)
-
getNlpTokenizer
public SQLExpr getNlpTokenizer()
-
setNlpTokenizer
public void setNlpTokenizer(SQLExpr nlpTokenizer)
-
getValueType
public SQLExpr getValueType()
-
setValueType
public void setValueType(SQLExpr x)
-
isPreSort
public boolean isPreSort()
-
setPreSort
public void setPreSort(boolean preSort)
-
getPreSortOrder
public int getPreSortOrder()
-
setPreSortOrder
public void setPreSortOrder(int preSortOrder)
-
getJsonIndexAttrsExpr
public SQLExpr getJsonIndexAttrsExpr()
-
setJsonIndexAttrsExpr
public void setJsonIndexAttrsExpr(SQLExpr jsonIndexAttrsExpr)
-
getAnnIndex
public SQLAnnIndex getAnnIndex()
-
setAnnIndex
public void setAnnIndex(SQLAnnIndex x)
-
getSequenceType
public AutoIncrementType getSequenceType()
-
setSequenceType
public void setSequenceType(AutoIncrementType sequenceType)
-
toString
public String toString()
- Overrides:
toStringin classSQLObjectImpl
-
getUnitCount
public SQLExpr getUnitCount()
-
getUnitIndex
public SQLExpr getUnitIndex()
-
setUnitIndex
public void setUnitIndex(SQLExpr unitIndex)
-
getNplTokenizer
public SQLExpr getNplTokenizer()
-
setNplTokenizer
public void setNplTokenizer(SQLExpr x)
-
getStep
public SQLExpr getStep()
-
setStep
public void setStep(SQLExpr step)
-
getMappedBy
public List<SQLAssignItem> getMappedBy()
-
getMappedByDirect
public List<SQLAssignItem> getMappedByDirect()
-
getColProperties
public List<SQLAssignItem> getColProperties()
-
getEncode
public SQLExpr getEncode()
-
setEncode
public void setEncode(SQLExpr encode)
-
getCompression
public SQLExpr getCompression()
-
setCompression
public void setCompression(SQLExpr compression)
-
setBlockSize
public void setBlockSize(SQLIntegerExpr blockSize)
-
getBlockSize
public SQLIntegerExpr getBlockSize()
-
getColPropertiesDirect
public List<SQLAssignItem> getColPropertiesDirect()
-
-