public interface DDLBuilder
| 限定符和类型 | 方法和说明 |
|---|---|
String |
alterColumn(Property property)
修改列
|
String |
createForeignKey(Property property)
建立外键约束
|
String |
createIndex(IndexField indexField)
创建索引
|
String |
createProperty(Property property)
创建字段
|
String |
createTable(Entity entity)
创建新表
|
String |
dropColumn(Property property)
删除列
|
String |
dropIndex(String tableName,
String indexName)
删除索引
|
String |
dropTable(String tableName)
删除表
|
void |
enableForeignConstraintCheck(boolean enable)
是否开启外键约束检查
|
List<Entity> |
getDatabaseEntity()
获取数据库信息
|
void |
getDatabaseName()
获取数据库名称
|
Map<String,String> |
getTypeFieldMapping()
获取默认Java类型与数据库类型映射关系表
|
List<Entity> |
getVirtualEntity()
获取虚拟表信息
|
String |
hasConstraintExists(String tableName,
String constraintName)
判断约束是否存在
|
String |
hasIndexExists(String tableName,
String indexName)
判断索引是否存在
|
String |
hasTableExists(Entity entity)
判断表是否已经存在
|
void getDatabaseName()
throws SQLException
SQLExceptionList<Entity> getDatabaseEntity() throws SQLException
SQLExceptionString hasIndexExists(String tableName, String indexName) throws SQLException
tableName - 表名indexName - 索引名称SQLExceptionString hasConstraintExists(String tableName, String constraintName) throws SQLException
tableName - 表名constraintName - 约束名称SQLExceptionString createIndex(IndexField indexField)
indexField - 索引字段String dropIndex(String tableName, String indexName)
tableName - 表名indexName - 索引名称String createForeignKey(Property property) throws SQLException
SQLExceptionvoid enableForeignConstraintCheck(boolean enable)
throws SQLException
SQLExceptionCopyright © 2021. All rights reserved.