| Package | Description |
|---|---|
| com.github.drinkjava2.jdialects | |
| com.github.drinkjava2.jdialects.model |
| Modifier and Type | Method and Description |
|---|---|
static String |
DebugUtils.getColumnModelDebugInfo(ColumnModel c) |
String[] |
Dialect.toAddColumnDDL(ColumnModel... columnModels)
Transfer columnModels to add column DDL String array
|
static String[] |
DDLCreateUtils.toAddColumnDDL(Dialect dialect,
ColumnModel... columnModels)
Transfer columnModels to add column DDL String array like:
"alter table xx_table add [column] xxx_column ...
|
String[] |
Dialect.toDropColumnDDL(ColumnModel... columnModels)
Transfer columnModels to drop column DDL String array
|
static String[] |
DDLDropUtils.toDropColumnDDL(Dialect dialect,
ColumnModel... columnModels)
Transfer columnModels to drop column DDL String array like:
"alter table xx_table drop [column] xxx_column ...
|
String |
Dialect.translateToDDLType(ColumnModel col)
Transfer columnModel to a real dialect's DDL definition String, lengths is
optional for some types
|
| Modifier and Type | Method and Description |
|---|---|
ColumnModel |
TableModel.addColumn(String columnName)
Add a column with given columnName to tableModel
|
ColumnModel |
ColumnModel.autoId()
Bind column to a global Auto Id generator, can be Sequence or a Table
|
ColumnModel |
ColumnModel.BIGDECIMAL() |
ColumnModel |
ColumnModel.BIGDECIMAL(Integer digiLength) |
ColumnModel |
ColumnModel.BIGDECIMAL(Integer precision,
Integer scale) |
ColumnModel |
ColumnModel.BIGINT() |
ColumnModel |
ColumnModel.BINARY() |
ColumnModel |
ColumnModel.BINARY(Integer length) |
ColumnModel |
ColumnModel.BIT() |
ColumnModel |
ColumnModel.BLOB() |
ColumnModel |
ColumnModel.BLOB(Integer length) |
ColumnModel |
ColumnModel.BOOLEAN() |
ColumnModel |
ColumnModel.CHAR() |
ColumnModel |
ColumnModel.CHAR(Integer length) |
ColumnModel |
ColumnModel.check(String check)
Add a column check DDL piece if support
|
ColumnModel |
ColumnModel.CLOB() |
ColumnModel |
ColumnModel.CLOB(Integer length) |
ColumnModel |
TableModel.column(String columnName)
find column in tableModel by given columnName, if not found, add a new column
with columnName
|
ColumnModel |
ColumnModel.comment(String comment)
Add comments at end of column definition DDL
|
ColumnModel |
ColumnModel.DATE() |
ColumnModel |
ColumnModel.DECIMAL() |
ColumnModel |
ColumnModel.DECIMAL(Integer precision,
Integer scale) |
ColumnModel |
ColumnModel.defaultValue(String value)
Default value for column's definition DDL
|
ColumnModel |
ColumnModel.DOUBLE() |
ColumnModel |
ColumnModel.entityField(String entityFieldName)
Mark this column map to a Java entity field, if exist other columns map to
this field, delete other columns.
|
ColumnModel |
ColumnModel.FLOAT() |
ColumnModel |
ColumnModel.FLOAT(Integer precision) |
ColumnModel |
TableModel.getColumn(String colOrFieldName)
Get ColumnModel by column Name or field name ignore case, if not found,
return null
|
ColumnModel |
TableModel.getColumnByColName(String colName)
Get ColumnModel by columnName ignore case, if not found, return null
|
ColumnModel |
TableModel.getColumnByFieldName(String fieldName)
Get ColumnModel by entity field name ignore case, if not found, return null
|
ColumnModel |
TableModel.getFirstPKeyColumn() |
ColumnModel |
TableModel.getShardDatabaseColumn() |
ColumnModel |
TableModel.getShardTableColumn() |
ColumnModel |
ColumnModel.id()
equal to pkey method.
|
ColumnModel |
ColumnModel.identityId()
Mark a field will use database's native identity type.
|
ColumnModel |
ColumnModel.idGenerator(String idGeneratorName)
The value of this column will be generated by a sequence or table generator
|
ColumnModel |
ColumnModel.insertable(Boolean insertable)
Mark a field insertable=true, only for JPA or ORM tool use
|
ColumnModel |
ColumnModel.INTEGER() |
ColumnModel |
ColumnModel.JAVA_OBJECT() |
ColumnModel |
ColumnModel.LONG() |
ColumnModel |
ColumnModel.LONGNVARCHAR(Integer length) |
ColumnModel |
ColumnModel.LONGVARBINARY() |
ColumnModel |
ColumnModel.LONGVARBINARY(Integer length) |
ColumnModel |
ColumnModel.LONGVARCHAR() |
ColumnModel |
ColumnModel.LONGVARCHAR(Integer length) |
ColumnModel |
ColumnModel.NCHAR(Integer length) |
ColumnModel |
ColumnModel.NCLOB() |
ColumnModel |
ColumnModel.newCopy() |
ColumnModel |
ColumnModel.notNull()
Add a not null DDL piece if support
|
ColumnModel |
ColumnModel.NUMERIC() |
ColumnModel |
ColumnModel.NUMERIC(Integer digiLength) |
ColumnModel |
ColumnModel.NUMERIC(Integer precision,
Integer scale) |
ColumnModel |
ColumnModel.NVARCHAR(Integer length) |
ColumnModel |
ColumnModel.pkey()
Mark primary key, if more than one will build compound Primary key
|
ColumnModel |
ColumnModel.REAL() |
ColumnModel |
ColumnModel.sequenceGenerator(String name,
String sequenceName,
Integer initialValue,
Integer allocationSize)
The value of this column will be generated by a sequence
|
ColumnModel |
ColumnModel.setColumnDefinition(String columnDefinition) |
ColumnModel |
ColumnModel.setValue(Object value) |
ColumnModel |
ColumnModel.setValueExist(Boolean valueExist) |
ColumnModel |
ColumnModel.shardDatabase(String... shardDatabase)
Mark is a shartDatabase column, for ORM tool use
|
ColumnModel |
ColumnModel.shardTable(String... shardTable)
Mark is a shartTable column, for ORM tool use
|
ColumnModel |
ColumnModel.SHORT() |
ColumnModel |
ColumnModel.singleIndex()
A shortcut method to add a index for single column, for multiple columns
index please use tableModel.index() method
|
ColumnModel |
ColumnModel.singleIndex(String indexName)
A shortcut method to add a index for single column, for multiple columns
index please use tableModel.index() method
|
ColumnModel |
ColumnModel.singleUnique()
A shortcut method to add a unique constraint for single column, for multiple
columns index please use tableModel.unique() method
|
ColumnModel |
ColumnModel.singleUnique(String uniqueName)
A shortcut method to add a unique constraint for single column, for multiple
columns index please use tableModel.unique() method
|
ColumnModel |
ColumnModel.SMALLINT() |
ColumnModel |
ColumnModel.snowflake() |
ColumnModel |
ColumnModel.sortedUUID(String name,
Integer sortedLength,
Integer uuidLength) |
ColumnModel |
ColumnModel.STRING(Integer length) |
ColumnModel |
ColumnModel.tableGenerator(String name,
String tableName,
String pkColumnName,
String valueColumnName,
String pkColumnValue,
Integer initialValue,
Integer allocationSize) |
ColumnModel |
ColumnModel.tail(String tail)
Put an extra tail String manually at the end of column definition DDL
|
ColumnModel |
ColumnModel.TIME() |
ColumnModel |
ColumnModel.TIMESTAMP() |
ColumnModel |
ColumnModel.timeStampId() |
ColumnModel |
ColumnModel.TINYINT() |
ColumnModel |
ColumnModel.updatable(Boolean updatable)
Mark a field updatable=true, only for JPA or ORM tool use
|
ColumnModel |
ColumnModel.uuid() |
ColumnModel |
ColumnModel.uuid25() |
ColumnModel |
ColumnModel.uuid26() |
ColumnModel |
ColumnModel.uuid32() |
ColumnModel |
ColumnModel.uuid36() |
ColumnModel |
ColumnModel.uuidAny(String name,
Integer length) |
ColumnModel |
ColumnModel.VARBINARY() |
ColumnModel |
ColumnModel.VARBINARY(Integer length) |
ColumnModel |
ColumnModel.VARCHAR(Integer length) |
| Modifier and Type | Method and Description |
|---|---|
List<ColumnModel> |
TableModel.getColumns() |
List<ColumnModel> |
TableModel.getPKeyColumns()
Get pkey columns sorted by column name
|
| Modifier and Type | Method and Description |
|---|---|
TableModel |
TableModel.addColumn(ColumnModel column)
Add a ColumnModel
|
| Modifier and Type | Method and Description |
|---|---|
void |
TableModel.setColumns(List<ColumnModel> columns) |
static void |
TableModel.sortColumns(List<ColumnModel> lst) |
Copyright © 2022. All rights reserved.