fix: oracle 表名支持小写字母

This commit is contained in:
taojinlong 2021-08-31 21:55:59 +08:00
parent 60b1275395
commit 7f0cdcd1bd

View File

@ -635,12 +635,17 @@ public class OracleQueryProvider extends QueryProvider {
stringBuilder.append(" \"").append(f.getOriginName()).append("\""); stringBuilder.append(" \"").append(f.getOriginName()).append("\"");
return stringBuilder.toString(); return stringBuilder.toString();
}).toArray(String[]::new); }).toArray(String[]::new);
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY null", StringUtils.join(array, ","), table ); return MessageFormat.format("SELECT {0} FROM {1} ORDER BY null", StringUtils.join(array, ","), "\"" + table + "\"");
} }
@Override @Override
public String createRawQuerySQLAsTmp(String sql, List<DatasetTableField> fields) { public String createRawQuerySQLAsTmp(String sql, List<DatasetTableField> fields) {
return createRawQuerySQL(" (" + sqlFix(sql) + ") DE_TMP ", fields, null); String[] array = fields.stream().map(f -> {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(" \"").append(f.getOriginName()).append("\"");
return stringBuilder.toString();
}).toArray(String[]::new);
return MessageFormat.format("SELECT {0} FROM {1} ORDER BY null", StringUtils.join(array, ","), " (" + sqlFix(sql) + ") DE_TMP " );
} }
public String transMysqlFilterTerm(String term) { public String transMysqlFilterTerm(String term) {