forked from github/dataease
Merge pull request #11343 from dataease/pr@dev-v2@refactor_copilot
refactor(copilot): 优化engine
This commit is contained in:
commit
a56dd590db
@ -114,7 +114,7 @@ public class CopilotManage {
|
||||
}
|
||||
|
||||
DatasourceSchemaDTO ds = dsMap.entrySet().iterator().next().getValue();
|
||||
String type = ds.getType();// 数据库类型,如mysql,oracle等,可能需要映射成copilot需要的类型
|
||||
String type = engine(ds.getType());// 数据库类型,如mysql,oracle等,可能需要映射成copilot需要的类型
|
||||
|
||||
datasetDataManage.buildFieldName(sqlMap, allFields);
|
||||
List<String> strings = transCreateTableFields(allFields);
|
||||
@ -468,4 +468,19 @@ public class CopilotManage {
|
||||
return copilotSQL;
|
||||
}
|
||||
}
|
||||
|
||||
private String engine(String type) {
|
||||
switch (type) {
|
||||
case "ck":
|
||||
return "ClickHouse";
|
||||
case "pg":
|
||||
return "PostgreSQL";
|
||||
case "mysql":
|
||||
return "MySQL";
|
||||
case "sqlServer":
|
||||
return "SQL Server";
|
||||
default:
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user