public interface DDLOperations
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addColumn(String tableCode,
TableField column)
添加列
|
void |
createSequence(String sequenceName)
创建sequence
|
void |
createTable(TableInfo tableInfo)
创建表
|
void |
dropColumn(String tableCode,
String columnCode)
删除列
|
void |
dropTable(String tableCode)
删除表
|
String |
makeAddColumnSql(String tableCode,
TableField column)
添加列
|
String |
makeCreateSequenceSql(String sequenceName)
创建序列
|
String |
makeCreateTableSql(TableInfo tableInfo)
创建表
|
String |
makeDropColumnSql(String tableCode,
String columnCode)
删除列
|
String |
makeDropTableSql(String tableCode)
删除表
|
String |
makeModifyColumnSql(String tableCode,
TableField oldColumn,
TableField column)
修改列定义 ,比如 修改 varchar 的长度
|
List<String> |
makeReconfigurationColumnSqls(String tableCode,
String columnCode,
TableField column)
重构列,涉及到内容格式的转换,需要新建一个列,将旧列中的数据转换到新列中,然后在删除旧列
|
String |
makeRenameColumnSql(String tableCode,
String columnCode,
TableField column)
重命名列
|
void |
modifyColumn(String tableCode,
TableField oldColumn,
TableField column)
修改列定义 ,比如 修改 varchar 的长度
|
void |
reconfigurationColumn(String tableCode,
String columnCode,
TableField column)
重构列,涉及到内容格式的转换,需要新建一个列,将旧列中的数据转换到新列中,然后在删除旧列
|
void |
renameColumn(String tableCode,
String columnCode,
TableField column)
重命名列
|
String makeCreateSequenceSql(String sequenceName)
sequenceName - 序列String makeAddColumnSql(String tableCode, TableField column)
tableCode - 表column - 字段String makeModifyColumnSql(String tableCode, TableField oldColumn, TableField column)
tableCode - 表代码oldColumn - 老的字段column - 字段String makeDropColumnSql(String tableCode, String columnCode)
tableCode - 表代码columnCode - 字段代码String makeRenameColumnSql(String tableCode, String columnCode, TableField column)
tableCode - 表代码columnCode - 字段代码column - 字段List<String> makeReconfigurationColumnSqls(String tableCode, String columnCode, TableField column)
tableCode - 表代码columnCode - 字段代码column - 字段void createSequence(String sequenceName) throws SQLException
sequenceName - sequenceNameSQLException - SQLExceptionvoid createTable(TableInfo tableInfo) throws SQLException
tableInfo - 表SQLException - SQLExceptionvoid dropTable(String tableCode) throws SQLException
tableCode - 表代码SQLException - SQLExceptionvoid addColumn(String tableCode, TableField column) throws SQLException
tableCode - 表代码column - 字段SQLException - SQLExceptionvoid modifyColumn(String tableCode, TableField oldColumn, TableField column) throws SQLException
tableCode - 表代码oldColumn - 老的字段column - 字段SQLException - SQLExceptionvoid dropColumn(String tableCode, String columnCode) throws SQLException
tableCode - 表代码columnCode - 字段代码SQLException - SQLExceptionvoid renameColumn(String tableCode, String columnCode, TableField column) throws SQLException
tableCode - 表代码columnCode - 字段代码column - 字段SQLException - SQLExceptionvoid reconfigurationColumn(String tableCode, String columnCode, TableField column) throws SQLException
tableCode - 表代码columnCode - 字段代码column - 字段SQLException - SQLExceptionCopyright © 2025 江苏南大先腾信息产业股份有限公司. All rights reserved.