refactor: Copilot仅支持MySQL数据源

This commit is contained in:
junjun
2025-01-14 15:31:08 +08:00
committed by dataeaseShu
parent d1b222532f
commit 41ba9d6ab3
4 changed files with 14 additions and 0 deletions

View File

@@ -219,6 +219,9 @@ public class DatasetTableFieldManage {
if (crossDs) {
DEException.throwException(Translator.get("i18n_dataset_cross_error"));
}
if (!isCopilotSupport(dsMap)) {
DEException.throwException(Translator.get("i18n_copilot_ds"));
}
QueryWrapper<CoreDatasetTableField> wrapper = new QueryWrapper<>();
wrapper.eq("dataset_group_id", id);
@@ -312,4 +315,9 @@ public class DatasetTableFieldManage {
DEException.throwException(Translator.get("i18n_name_limit_100"));
}
}
public boolean isCopilotSupport(Map<Long, DatasourceSchemaDTO> dsMap) {
DatasourceSchemaDTO value = dsMap.entrySet().iterator().next().getValue();
return StringUtils.equalsIgnoreCase(value.getType(), "mysql");
}
}

View File

@@ -200,3 +200,5 @@ i18n_geo_exists=An area with the same name already exists\uFF01
i18n_geo_sub_exists=A sub-area with the same name already exists\uFF01
i18n_user_new_pwd_error=Password format: 8-20 characters and must include at least one uppercase letter, one lowercase letter, one number, and one special character.
i18n_user_pwd_same_error=Old and new passwords cannot be the same
i18n_copilot_ds=Only supports MySQL datasource

View File

@@ -199,3 +199,5 @@ i18n_geo_exists=\u5DF2\u5B58\u5728\u540C\u540D\u533A\u57DF\uFF01
i18n_geo_sub_exists=\u5DF2\u5B58\u5728\u540C\u540D\u5B50\u533A\u57DF\uFF01
i18n_user_new_pwd_error=\u5BC6\u7801\u683C\u5F0F\uFF1A8-20\u4F4D\u4E14\u81F3\u5C11\u4E00\u4F4D\u5927\u5199\u5B57\u6BCD\u3001\u5C0F\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u3001\u7279\u6B8A\u5B57\u7B26
i18n_user_pwd_same_error=\u65B0\u65E7\u5BC6\u7801\u4E0D\u80FD\u76F8\u540C
i18n_copilot_ds=\u5f53\u524d\u4ec5\u652f\u6301MySQL\u6570\u636e\u6e90

View File

@@ -199,3 +199,5 @@ i18n_geo_exists=\u5DF2\u5B58\u5728\u540C\u540D\u5340\u57DF\uFF01
i18n_geo_sub_exists=\u5DF2\u5B58\u5728\u540C\u540D\u5B50\u5340\u57DF\uFF01
i18n_user_new_pwd_error=\u5BC6\u78BC\u683C\u5F0F\uFF1A8-20\u4F4D\u4E14\u81F3\u5C11\u4E00\u4F4D\u5927\u5BEB\u5B57\u6BCD\u3001\u5C0F\u5BEB\u5B57\u6BCD\u3001\u6578\u5B57\u3001\u7279\u6B8A\u5B57\u7B26
i18n_user_pwd_same_error=\u65B0\u820A\u5BC6\u78BC\u4E0D\u80FD\u76F8\u540C
i18n_copilot_ds=\u7576\u524d\u50c5\u652f\u6301MySQL\u6578\u64da\u6e90