public class Ddl extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
_index(T entity,
String fields,
String indexName,
String PREFIX,
String IndexTypeTip,
String IndexType) |
static <T> boolean |
createTable(T entity)
根据Javabean生成数据库表,Javabean无需配置过多的字段信息.此方法只考虑通用情况,若有详细需求,不建议采用
According to the database table generated by JavaBean, JavaBean does not need to configure too much field information. |
static <T> boolean |
createTable(T entity,
boolean isDropExistTable) |
static <T> void |
indexNormal(T entity,
String fields)
创建通用索引.create normal index
|
static <T> void |
indexNormal(T entity,
String fields,
String indexName)
创建通用索引.create normal index
|
static <T> boolean |
isExistTable(T entity)
check whether the table exist or not.
|
static <T> void |
primaryKey(T entity,
String fields) |
static <T> void |
primaryKey(T entity,
String fields,
String keyName)
创建主键,一般是多字段联合主键.create primary key
|
static void |
setDynamicParameter(String para,
String value) |
static <T> String |
toCreateTableSQL(T entity)
根据Javabean生成数据库表建表语句,Javabean无需配置过多的字段信息.此方法只考虑通用情况,若有详细需求,不建议采用
According to the statement of creating database table generated by JavaBean, JavaBean does not need to configure too much field information. |
static <T> void |
unique(T entity,
String fields)
创建唯一索引.create unique index
|
static <T> void |
unique(T entity,
String fields,
String indexName)
创建唯一索引.create unique index
|
public static <T> boolean createTable(T entity,
boolean isDropExistTable)
public static <T> boolean isExistTable(T entity)
entity - public static <T> boolean createTable(T entity)
entity - Javabean entity.public static <T> String toCreateTableSQL(T entity)
entity - Javabean entity.public static <T> void indexNormal(T entity,
String fields)
entity - table's entity(do not allow null).fields - field name,if more than one,separate with comma.public static <T> void indexNormal(T entity,
String fields,
String indexName)
entity - table's entity(do not allow null).fields - field name,if more than one,separate with comma.indexName - index namepublic static <T> void unique(T entity,
String fields)
entity - table's entity(do not allow null).fields - field name,if more than one,separate with comma.public static <T> void unique(T entity,
String fields,
String indexName)
entity - table's entity(do not allow null).fields - field name,if more than one,separate with comma.indexName - index namepublic static <T> void _index(T entity,
String fields,
String indexName,
String PREFIX,
String IndexTypeTip,
String IndexType)
public static <T> void primaryKey(T entity,
String fields)
Copyright © 2023. All rights reserved.