类 SQLCreateTableStatement
java.lang.Object
com.alibaba.druid.sql.ast.SQLObjectImpl
com.alibaba.druid.sql.ast.SQLStatementImpl
com.alibaba.druid.sql.ast.statement.SQLCreateTableStatement
- 所有已实现的接口:
SQLDbTypedObject,SQLObject,SQLStatement,SQLCreateStatement,SQLDDLStatement
- 直接已知子类:
AntsparkCreateTableStatement,BlinkCreateTableStatement,ClickhouseCreateTableStatement,DB2CreateTableStatement,HiveCreateTableStatement,MySqlCreateTableStatement,OracleCreateTableStatement,PrestoCreateTableStatement,StarRocksCreateTableStatement
public class SQLCreateTableStatement
extends SQLStatementImpl
implements SQLDDLStatement, SQLCreateStatement
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 com.alibaba.druid.sql.ast.statement.SQLDDLStatement
SQLDDLStatement.DDLObjectType -
字段概要
字段修饰符和类型字段说明protected intprotected final List<SQLSelectOrderByItem>protected ClusteringTypeprotected SQLExprprotected Booleanprotected booleanprotected SQLExprprotected booleanprotected booleanprotected booleanprotected SQLExprTableSourceprotected SQLExprTableSourceprotected SQLPartitionByprotected SQLExprprotected Booleanprotected booleanprotected booleanprotected final List<SQLColumnDefinition>protected SQLPartitionByprotected SQLPartitionOfprotected booleanprotected SQLExternalRecordFormatprotected SQLSelectprotected intprotected booleanprotected final List<SQLSelectOrderByItem>protected SQLExprprotected List<SQLTableElement>protected final List<SQLAssignItem>protected SQLExprTableSourceprotected SQLNameprotected final List<SQLAssignItem>protected SQLCreateTableStatement.Type从类继承的字段 com.alibaba.druid.sql.ast.SQLStatementImpl
afterSemi, dbType, headHints从类继承的字段 com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidprotected voidvoidaddBodyBeforeComment(List<String> comments) voidvoidaddColumn(SQLColumnDefinition column) voidvoidvoidvoidvoidaddTblProperty(String name, SQLExpr value) protected booleanalterApply(SQLAlterTableItem item) protected booleanapply(SQLAlterTableAddIndex item) booleanapply(SQLAlterTableStatement alter) booleanbooleanclone()voidprotected intcolumnIndexOf(SQLName column) booleanbooleancontainsDuplicateColumnNames(boolean throwException) findColumn(long columName_hash) findColumn(String columName) findUnique(String columnName) voidforEachColumn(Consumer<SQLColumnDefinition> columnConsumer) intgetColumnNames(boolean normalized) getLike()getName()getOptionValue(String name) intgetTblProperty(String name) getTblPropertyValue(String name) getType()booleanbooleanbooleanbooleanbooleanbooleanisIgnore()booleanonly for show columnsbooleanbooleanisOnlyPrimaryKey(long columnNameHash) booleanisPrimaryColumn(long columnNameHash) booleanisPrimaryColumn(String columnName) booleanisReferenced(SQLName tableName) booleanisReferenced(String tableName) booleanbooleanisSingle()booleanonly for show columnsbooleanrenameColumn(String colummName, String newColumnName) voidsetBuckets(int buckets) voidsetClusteringType(ClusteringType clusteringType) voidsetComment(SQLExpr comment) voidsetCompress(Boolean compress) voidsetDimension(boolean dimension) voidvoidsetExternal(boolean external) voidsetIfNotExiists(boolean ifNotExists) voidsetIgnore(boolean ignore) voidsetInherits(SQLExprTableSource inherits) voidvoidsetLike(SQLExprTableSource like) voidsetLocalPartitioning(SQLPartitionBy localPartitioning) voidvoidsetLogging(Boolean logging) voidvoidvoidsetOnCommitPreserveRows(boolean onCommitPreserveRows) voidsetPartitioning(SQLPartitionBy partitioning) voidsetPartitionOf(SQLPartitionOf partitionOf) voidsetReplace(boolean replace) voidvoidvoidvoidsetShards(int shards) voidsetSingle(boolean single) voidvoidsetTableName(String tableName) voidsetTableSource(SQLExprTableSource tableSource) voidvoidvoidsimplify()static voidsort(List<SQLStatement> stmtList) toString()从类继承的方法 com.alibaba.druid.sql.ast.SQLStatementImpl
getDbType, getHeadHintsDirect, isAfterSemi, setAfterSemi, setDbType, setHeadHints, toLowerCaseString, toParameterizedString, toString, toUnformattedString从类继承的方法 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, putAttribute, setHint, setParent, setSourceColumn, setSourceLine从接口继承的方法 com.alibaba.druid.sql.ast.SQLObject
accept, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getParent, hasAfterComment, hasBeforeComment, output, putAttribute, setParent从接口继承的方法 com.alibaba.druid.sql.ast.SQLStatement
getDbType, getHeadHintsDirect, isAfterSemi, setAfterSemi, setHeadHints, toLowerCaseString, toParameterizedString, toString
-
字段详细资料
-
ifNotExists
protected boolean ifNotExists -
type
-
tableSource
-
tableElementList
-
inherits
-
select
-
comment
-
like
-
compress
-
logging
-
tablespace
-
partitioning
-
partitionOf
-
localPartitioning
-
storedAs
-
location
-
onCommitPreserveRows
protected boolean onCommitPreserveRows -
onCommitDeleteRows
protected boolean onCommitDeleteRows -
external
protected boolean external -
rowFormat
-
partitionColumns
-
clusteringType
-
clusteredBy
-
sortedBy
-
buckets
protected int buckets -
shards
protected int shards -
tableOptions
-
tblProperties
-
replace
protected boolean replace -
ignore
protected boolean ignore -
single
protected boolean single -
dimension
protected boolean dimension -
engine
-
-
构造器详细资料
-
SQLCreateTableStatement
public SQLCreateTableStatement() -
SQLCreateTableStatement
-
-
方法详细资料
-
accept0
- 覆盖:
accept0在类中SQLStatementImpl
-
acceptChild
-
getComment
-
setComment
-
getName
- 指定者:
getName在接口中SQLCreateStatement
-
getTableName
-
getSchema
-
setSchema
-
setName
-
setName
-
getTableSource
-
setTableSource
-
setTableName
-
getType
-
setType
-
getTableElementList
-
getColumn
-
getColumnDefinitions
-
getColumnNames
-
getColumnComments
-
getPrimaryKeyNames
-
addColumn
-
addColumn
-
isIfNotExists
public boolean isIfNotExists() -
setIfNotExiists
public void setIfNotExiists(boolean ifNotExists) -
getInherits
-
setInherits
-
getSelect
-
setSelect
-
getLike
-
setLike
-
setLike
-
getCompress
-
setCompress
-
getLogging
-
setLogging
-
getTablespace
-
setTablespace
-
getPartitioning
-
getLocalPartitioning
-
setPartitioning
-
getPartitionOf
-
setPartitionOf
-
setLocalPartitioning
-
getChildren
- 指定者:
getChildren在接口中SQLStatement- 覆盖:
getChildren在类中SQLStatementImpl
-
addBodyBeforeComment
-
getBodyBeforeCommentsDirect
-
hasBodyBeforeComment
public boolean hasBodyBeforeComment() -
computeName
-
findColumn
-
findColumn
-
isPrimaryColumn
-
isPrimaryColumn
public boolean isPrimaryColumn(long columnNameHash) -
isOnlyPrimaryKey
public boolean isOnlyPrimaryKey(long columnNameHash) -
isMUL
only for show columns -
isUNI
only for show columns -
findUnique
-
findIndex
-
forEachColumn
-
findPrimaryKey
-
findForeignKey
-
hashForeignKey
public boolean hashForeignKey() -
isReferenced
-
isReferenced
-
foreignKeyToAlterTable
-
sort
-
simplify
public void simplify() -
apply
-
apply
-
apply
-
alterApply
-
renameColumn
-
apply
-
columnIndexOf
-
cloneTo
-
isReplace
public boolean isReplace() -
setReplace
public void setReplace(boolean replace) -
isIgnore
public boolean isIgnore() -
setIgnore
public void setIgnore(boolean ignore) -
isSingle
public boolean isSingle() -
setSingle
public void setSingle(boolean single) -
getStoredAs
-
setStoredAs
-
clone
- 指定者:
clone在接口中SQLObject- 指定者:
clone在接口中SQLStatement- 覆盖:
clone在类中SQLStatementImpl
-
toString
- 指定者:
toString在接口中SQLStatement- 覆盖:
toString在类中SQLStatementImpl
-
isOnCommitPreserveRows
public boolean isOnCommitPreserveRows() -
setOnCommitPreserveRows
public void setOnCommitPreserveRows(boolean onCommitPreserveRows) -
isExternal
public boolean isExternal() -
setExternal
public void setExternal(boolean external) -
getClusteringType
-
setClusteringType
-
getClusteredBy
-
addClusteredByItem
-
getSortedBy
-
addSortedByItem
-
getBuckets
public int getBuckets() -
setBuckets
public void setBuckets(int buckets) -
getShards
public int getShards() -
setShards
public void setShards(int shards) -
getPartitionColumns
-
addPartitionColumn
-
getTableOptions
-
getTblProperties
-
addTblProperty
-
getRowFormat
-
setRowFormat
-
isDimension
public boolean isDimension() -
setDimension
public void setDimension(boolean dimension) -
getLocation
-
setLocation
-
addOption
-
getOption
-
getTblProperty
-
getOptionValue
-
getTblPropertyValue
-
getOptionOrTblPropertyValue
-
getCatalog
-
containsDuplicateColumnNames
public boolean containsDuplicateColumnNames() -
containsDuplicateColumnNames
public boolean containsDuplicateColumnNames(boolean throwException) -
getEngine
-
setEngine
-
getDDLObjectType
- 指定者:
getDDLObjectType在接口中SQLDDLStatement
-