public interface TableBuilder
| 限定符和类型 | 方法和说明 |
|---|---|
void |
alterColumn(Property property)
修改列
|
void |
automaticCreateTableAndField()
自动建表和新增字段
|
void |
createForeignKey(Property property)
建立外键约束
|
void |
createIndex(Entity entity,
IndexType indexType)
创建索引
|
void |
createProperty(Property property)
创建新表
|
void |
createTable(Entity entity)
创建新表
|
void |
deleteColumn(Property property)
删除列
|
void |
dropIndex(Entity entity,
IndexType indexType)
删除索引
|
void |
dropTable(String tableName)
删除表
|
String |
getAutoIncrementSQL(Property property)
创建自增列SQL语句
|
List<Entity> |
getDatabaseEntity()
获取数据库信息
|
String |
getDatabaseName()
获取数据库名称
|
boolean |
hasConstraintExists(String tableName,
String constraintName)
判断外键约束是否已经存在
|
boolean |
hasIndexExists(Entity entity,
IndexType indexType)
判断索引是否已经存在
|
boolean |
hasTableExists(Entity entity)
判断表是否已经存在
|
void |
rebuild(Entity entity)
重建表
|
void |
refreshDbEntityList()
刷新数据库字段信息
|
String getDatabaseName() throws SQLException
SQLExceptionList<Entity> getDatabaseEntity() throws SQLException
SQLExceptionString getAutoIncrementSQL(Property property) throws SQLException
SQLExceptionboolean hasTableExists(Entity entity) throws SQLException
SQLExceptionvoid createTable(Entity entity) throws SQLException
SQLExceptionvoid createProperty(Property property) throws SQLException
SQLExceptionvoid alterColumn(Property property) throws SQLException
SQLExceptionvoid deleteColumn(Property property) throws SQLException
SQLExceptionvoid dropTable(String tableName) throws SQLException
SQLExceptionvoid rebuild(Entity entity) throws SQLException
SQLExceptionboolean hasIndexExists(Entity entity, IndexType indexType) throws SQLException
SQLExceptionvoid createIndex(Entity entity, IndexType indexType) throws SQLException
entity - 实体表信息indexType - 索引类型SQLExceptionboolean hasConstraintExists(String tableName, String constraintName) throws SQLException
SQLExceptionvoid dropIndex(Entity entity, IndexType indexType) throws SQLException
SQLExceptionvoid createForeignKey(Property property) throws SQLException
SQLExceptionvoid automaticCreateTableAndField()
throws SQLException
SQLExceptionvoid refreshDbEntityList()
Copyright © 2020. All rights reserved.