fix: 去掉数据库名

This commit is contained in:
taojinlong 2023-11-27 12:30:27 +08:00
parent 597d897473
commit 693f83ad6d
3 changed files with 15 additions and 7 deletions

View File

@ -1116,6 +1116,19 @@ public class DataSetTableService {
}
private String handlePlainSelect(PlainSelect plainSelect, Select statementSelect, String dsType) throws Exception {
List<SelectItem> selectItems = new ArrayList<>();
plainSelect.getSelectItems().forEach(selectItem -> {
System.out.println(selectItem);
System.out.println(selectItem instanceof PlainSelect);
System.out.println(selectItem instanceof SubSelect);
selectItems.add(selectItem);
});
plainSelect.addSelectItems(selectItems);
FromItem fromItem = plainSelect.getFromItem();
if (fromItem instanceof SubSelect) {
SelectBody selectBody = ((SubSelect) fromItem).getSelectBody();

View File

@ -13,9 +13,8 @@ public class DmConfig extends JdbcConfiguration {
public String getJdbc() {
return "jdbc:dm://HOST:PORT/DATABASE"
return "jdbc:dm://HOST:PORT"
.replace("HOST", getHost().trim())
.replace("PORT", getPort().toString())
.replace("DATABASE", getDataBase().trim());
.replace("PORT", getPort().toString());
}
}

View File

@ -20,10 +20,6 @@
<el-input :placeholder="$t('enter_the_port')" v-model="form.configuration.port" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('dataBase')" prop="configuration.dataBase">
<el-input v-model="form.configuration.dataBase" autocomplete="off"/>
</el-form-item>
<el-form-item :label="$t('username')" prop="configuration.username">
<el-input :placeholder="$t('one_user_name')" v-model="form.configuration.username" autocomplete="off"/>
</el-form-item>