mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix(数据源): 修复数据源schema是关键字报错 #13189
This commit is contained in:
parent
95d5d949ac
commit
1432107999
@ -209,8 +209,6 @@ public class DatasetSQLManage {
|
||||
String tablePrefix = "";
|
||||
String tableSuffix = "";
|
||||
if (ObjectUtils.isNotEmpty(currentSQLObj.getTableSchema())) {
|
||||
ts = currentSQLObj.getTableSchema() + ".";
|
||||
|
||||
if (isCross) {
|
||||
tablePrefix = "`";
|
||||
tableSuffix = "`";
|
||||
@ -219,6 +217,8 @@ public class DatasetSQLManage {
|
||||
tablePrefix = datasourceType.getPrefix();
|
||||
tableSuffix = datasourceType.getSuffix();
|
||||
}
|
||||
|
||||
ts = tablePrefix + currentSQLObj.getTableSchema() + tableSuffix + ".";
|
||||
}
|
||||
// build join
|
||||
join.append(" ").append(joinType).append(" ")
|
||||
|
@ -44,7 +44,6 @@ public class TableUtils {
|
||||
String prefix = "";
|
||||
String suffix = "";
|
||||
if (StringUtils.isNotEmpty(sqlObj.getTableSchema())) {
|
||||
schema = sqlObj.getTableSchema() + ".";
|
||||
if (isCross) {
|
||||
prefix = "`";
|
||||
suffix = "`";
|
||||
@ -52,6 +51,7 @@ public class TableUtils {
|
||||
prefix = datasourceType.getPrefix();
|
||||
suffix = datasourceType.getSuffix();
|
||||
}
|
||||
schema = prefix + sqlObj.getTableSchema() + suffix + ".";
|
||||
}
|
||||
return schema + prefix + sqlObj.getTableName() + suffix + " " + sqlObj.getTableAlias();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user