public void createTableIfNotExist(Class<?> entityType) throws DbException { if (!tableIsExist(entityType)) { SqlInfo sqlInfo = SqlInfoBuilder.buildCreateTableSqlInfo(this, entityType); execNonQuery(sqlInfo); String execAfterTableCreated = TableUtils.getExecAfterTableCreated(entityType); if (!TextUtils.isEmpty(execAfterTableCreated)) { execNonQuery(execAfterTableCreated); } } }
public void dropTable(Class<?> entityType) throws DbException { if (!tableIsExist(entityType)) return; String tableName = TableUtils.getTableName(entityType); execNonQuery("DROP TABLE " + tableName); Table.remove(this, entityType); }