From 8fc65f7f1975a8b7fb0905258d8d2cb737f22fa9 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 16 May 2023 15:02:07 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=8E=B7=E5=8F=96=20oracle=20?= =?UTF-8?q?=E6=89=80=E6=9C=89=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/provider/datasource/JdbcProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java b/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java index 2aea2a0317..2581ceb3d9 100644 --- a/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java +++ b/backend/src/main/java/io/dataease/provider/datasource/JdbcProvider.java @@ -657,8 +657,8 @@ public class JdbcProvider extends DefaultJdbcProvider { if (StringUtils.isEmpty(oracleConfiguration.getSchema())) { throw new Exception(Translator.get("i18n_schema_is_empty")); } - return "select table_name, owner, comments from all_tab_comments where owner='OWNER' AND table_type = 'TABLE' AND table_name in (select table_name from all_tables where owner='OWNER')".replaceAll("OWNER", oracleConfiguration.getSchema()); - case pg: + return "select table_name, owner, comments from all_tab_comments where owner='" + oracleConfiguration.getSchema() + "' AND table_type = 'TABLE'"; + case pg: PgConfiguration pgConfiguration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), PgConfiguration.class); if (StringUtils.isEmpty(pgConfiguration.getSchema())) { throw new Exception(Translator.get("i18n_schema_is_empty"));