public class Table<E extends Table> extends Metadata<E> implements Serializable
| 限定符和类型 | 类和说明 |
|---|---|
static class |
Table.Cluster |
static class |
Table.Distribution
分桶方式及数量
distribution 或 clustered
|
static class |
Table.Key |
static class |
Table.Partition
分区
partition by :分区方式(LIST, RANGE, HASH)及 依据列
partition of :主表
partition for:分区依据值
|
static class |
Table.Skew |
static class |
Table.Store |
static class |
Table.TYPE |
action, alias, catalog, checkSchemaTime, comment, database, databaseType, datasource, ddls, definition, drop, engine, execute, extend, FIELD_ACTION, FIELD_ALIAS, FIELD_CATALOG, FIELD_CHECK_SCHEMA_TIME, FIELD_COMMENT, FIELD_DATABASE, FIELD_DATASOURCE, FIELD_DDL, FIELD_DEFINITION, FIELD_DROP, FIELD_DROP_CHECK, FIELD_DROP_CHECK_VALUE, FIELD_EXECUTE, FIELD_EXECUTE_CHECK, FIELD_EXECUTE_CHECK_VALUE, FIELD_EXTEND, FIELD_GETMAP, FIELD_GETMAP_CHECK, FIELD_GETMAP_CHECK_VALUE, FIELD_ID, FIELD_IDENTITY, FIELD_METADATA, FIELD_NAME, FIELD_OBJECT_ID, FIELD_PROPERTY, FIELD_RUN, FIELD_SCHEMA, FIELD_SETMAP, FIELD_SETMAP_CHECK, FIELD_SETMAP_CHECK_VALUE, FIELD_SWT, FIELD_TEXT, FIELD_USER, getmap, id, identity, metadata, name, objectId, options, origin, property, runs, schema, setmap, swt, text, update, user| 构造器和说明 |
|---|
Table() |
Table(Catalog catalog,
Schema schema,
String name) |
Table(Schema schema,
String table) |
Table(String name) |
Table(String schema,
String table) |
Table(String catalog,
String schema,
String name) |
addDdl, addOption, addRun, check, ddl, ddl, ddls, ddls, delete, execute, execute, getAction, getAlias, getCatalog, getCatalogName, getCheckSchemaTime, getComment, getDatabase, getDatabaseName, getDatabaseType, getDataSource, getDdl, getDdl, getDdls, getDdls, getDefinition, getEngine, getExtend, getFullName, getId, getIdentity, getMetadata, getName, getObjectId, getOrigin, getProperty, getRun, getRun, getRuns, getRuns, getSchema, getSchemaName, getText, getUpdate, getUser, getUserName, isDelete, isDrop, isEmpty, isRename, match, match, match, match, match, names, names, names, names, options, run, run, runs, runs, setAction, setAlias, setCatalog, setCatalog, setCheckSchemaTime, setComment, setDatabase, setDatabase, setDatabaseType, setDataSource, setDdls, setDefinition, setDelete, setDrop, setEngine, setExtend, setId, setMetadata, setName, setNewName, setNewName, setObjectId, setProperty, setProperty, setRuns, setSchema, setSchema, setText, setUpdate, setUser, setUser, sort, swt, swt, update, updateprotected String keyword
protected Table inherit
protected Table master
protected Table.Partition partition
protected Table.Partition subPartition
protected String type
protected int srid
protected String typeCat
protected String typeSchema
protected String typeName
protected String selfReferencingColumn
protected String refGeneration
protected String charset
protected String collate
protected Long ttl
protected Date createTime
protected Date updateTime
protected Long dataRows
protected Long dataLength
protected Long increment
protected Long dataFree
protected Long indexLength
protected int temporary
protected int metadataScan
protected Table.Skew skew
protected Table.Store store
protected String location
protected int changePrimary
protected LinkedHashMap<String,View> materializes
protected Table.Distribution distribution
protected PrimaryKey primaryKey
protected LinkedHashMap<String,Column> columns
protected LinkedHashMap<String,Tag> tags
protected LinkedHashMap<String,Index> indexes
protected LinkedHashMap<String,Constraint> constraints
protected boolean sort
protected List<AggregationConfig> aggregations
protected GroupStore groups
protected boolean autoDropColumn
public Table()
public Table(String name)
public static Type type(int type)
public Table resetColumnLength(double rate, String... types)
rate - 比例types - 数据类型public GroupStore groups()
public Table aggregation(Aggregation aggregation, String column, String result)
public Table aggregation(AggregationConfig... configs)
public List<AggregationConfig> aggregations()
public Table.Distribution getDistribution()
public Table setDistribution(Table.Distribution distribution)
public Table setCluster(Table.Distribution distribution)
public Table setDistribution(Table.Distribution.TYPE type, int buckets, String... columns)
type - 分桶方式buckets - 分桶数量columns - 分桶依据列public Table setDistribution(Table.Distribution.TYPE type, String... columns)
type - 分桶方式columns - 分桶依据列public int getPrimaryKeySize()
public Table addKey(Table.Key.TYPE type, String... columns)
public Table.Partition getPartition()
public Table partitionFor(Table.Partition.TYPE type, Object... values)
type - 分区方式values - 分区依据值public Table setPartition(Table.Partition partition)
public Table partitionBy(Table.Partition.TYPE type, String... columns)
public Table.Partition getSubPartition()
public Table subPartitionFor(Table.Partition.TYPE type, Object... values)
type - 分区方式values - 分区依据值public Table setSubPartition(Table.Partition partition)
public Table subPartitionBy(Table.Partition.TYPE type, String... columns)
public String getMasterName()
public Table getMaster()
public LinkedHashMap<String,View> getMaterializes()
public Table setMaterializes(LinkedHashMap<String,View> materializes)
public int getMetadataScan()
public void setMetadataScan(int metadataScan)
public LinkedHashMap<String,Column> primarys()
public Column primary()
public Long getTtl()
public Column addColumn(String name, TypeMetadata type)
public Column addColumn(String name, TypeMetadata type, boolean nullable, Object def)
public Table setPrimaryKey(PrimaryKey primaryKey)
public Table checkColumnPrimary()
public Table createPrimaryKey()
public String getName(boolean greedy)
public String getType()
public String getTypeCat()
public String getTypeSchema()
public String getTypeName()
public String getSelfReferencingColumn()
public String getRefGeneration()
public LinkedHashMap<String,Column> getColumns()
public <T extends Column> Table setColumns(LinkedHashMap<String,T> columns)
public LinkedHashMap<String,Tag> getTags()
public Table setTags(LinkedHashMap<String,Tag> tags)
public <T extends Index> LinkedHashMap<String,T> getIndexes()
public LinkedHashMap<String,Column> getPrimaryKeyColumns()
public PrimaryKey getPrimaryKey()
public int getChangePrimary()
public void setChangePrimary(int changePrimary)
public <T extends Index> Table setIndexes(LinkedHashMap<String,T> indexes)
public Table add(Constraint constraint)
public <T extends Constraint> LinkedHashMap<String,T> getConstraints()
public Table setConstraints(LinkedHashMap<String,Constraint> constraints)
public String getCharset()
public String getCollate()
public int getSrid()
public Table setSrid(int srid)
public Table.Skew getSkew()
public void setSkew(Table.Skew skew)
public Table.Store getStore()
public void setStore(Table.Store store)
public String getLocation()
public void setLocation(String location)
public Long getDataFree()
public String getEngineParameters()
public Table getInherit()
public String getKeyword()
getKeyword 在类中 Metadata<E extends Table>public boolean isAutoDropColumn()
public Table setAutoDropColumn(boolean autoDropColumn)
public Date getCreateTime()
public Date getUpdateTime()
public Long getDataRows()
public Long getDataLength()
public int getTemporary()
public boolean isTemporary()
public Table setTemporary(int temporary)
public Table setTemporary(boolean temporary)
public Long getIncrement()
public Long getIndexLength()
public boolean isSort()
public Table setSort(boolean sort)
public String json()
public void clearPropertyTable()
public Table sort(boolean nullFirst)
nullFirst - 未设置位置(setPosition)的列是否排在最前public Table sort()
public boolean equals(Table table)
public boolean equals(Table table, boolean ignoreCase)
public boolean equals(Table table, boolean ignoreCase, boolean ignoreSchema)
public boolean primaryEquals(Table table)
table - tablepublic TableDiffer compare(Table table, MetadataDiffer.DIRECT direct)
public TableDiffer compare(Table table)
Copyright © 2025. All rights reserved.