mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-09-26 00:24:09 +08:00
update
This commit is contained in:
@ -86,7 +86,7 @@ public class TableServiceImpl implements TableService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ListResult<Sql> buildSql(Table oldTable, Table newTable) {
|
public ListResult<Sql> buildSql(Table oldTable, Table newTable) {
|
||||||
SqlBuilder sqlBuilder = Chat2DBContext.getSqlBuilder(oldTable.getDbType());
|
SqlBuilder sqlBuilder = Chat2DBContext.getSqlBuilder();
|
||||||
List<Sql> sqls = new ArrayList<>();
|
List<Sql> sqls = new ArrayList<>();
|
||||||
if (oldTable == null) {
|
if (oldTable == null) {
|
||||||
sqls.add(Sql.builder().sql(sqlBuilder.buildCreateTableSql(newTable)).build());
|
sqls.add(Sql.builder().sql(sqlBuilder.buildCreateTableSql(newTable)).build());
|
||||||
|
@ -43,8 +43,8 @@ public class Chat2DBContext {
|
|||||||
return PLUGIN_MAP.get(dbType).getDBConfig().getDefaultDriverConfig();
|
return PLUGIN_MAP.get(dbType).getDBConfig().getDefaultDriverConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SqlBuilder getSqlBuilder(String dbType) {
|
public static SqlBuilder getSqlBuilder() {
|
||||||
return PLUGIN_MAP.get(dbType).getMetaData().getSqlBuilder();
|
return PLUGIN_MAP.get(getConnectInfo().getDbType()).getMetaData().getSqlBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user