Class SchemaHelper
java.lang.Object
cool.scx.jdbc.SchemaHelper
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckNeedFixTable(Table tableInfo, DataSource dataSource) 检查是否需要修复表static voidfixTable(Table tableInfo, JDBCContext jdbcContext) 和当前数据中同名表进行比对 进行修复 (若表不存在则创建,若存在则只添加不存在的列)static StringgetMigrateSQL(Table oldTable, Table newTable, Dialect dialect) 获取迁移 SQL (当前只支持 创建不存在的新列) todo 需要支持删除旧列和修改列verifyTable(Table oldTable, Table newTable)
-
Constructor Details
-
SchemaHelper
public SchemaHelper()
-
-
Method Details
-
getMigrateSQL
-
verifyTable
-
fixTable
和当前数据中同名表进行比对 进行修复 (若表不存在则创建,若存在则只添加不存在的列)- Parameters:
tableInfo- a- Throws:
SQLException- a
-
checkNeedFixTable
检查是否需要修复表- Parameters:
tableInfo- a- Returns:
- true 需要 false 不需要
- Throws:
SQLException- e
-