From d9f6172f089321a49574e7d637a870d35a8498c1 Mon Sep 17 00:00:00 2001 From: xiqiu Date: Mon, 1 Mar 2021 16:38:09 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-48046=20=20=20=20=E9=A2=9D=E5=A4=96?= =?UTF-8?q?=E5=88=A0=E9=99=A4schema=E4=B8=BAnull=E7=9A=84=E7=BC=93?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/gui/ilist/TableViewList.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index 73da78151..ec05732c6 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -109,10 +109,9 @@ public class TableViewList extends UIList { String[] schemas = DataCoreUtils.getDatabaseSchema(datasource); schemas = (schemas == null || schemas.length == 0) ? new String[]{null} : schemas; for (String schema : schemas) { - DataCoreUtils.refreshTables(datasource, TableProcedure.TABLE, schema); - DataCoreUtils.refreshTables(datasource, TableProcedure.VIEW, schema); - DataCoreUtils.refreshTables(datasource, TableProcedure.PROCEDURE, schema); + clearCache(datasource, schema); } + clearCache(datasource, null); return processDataInAnotherThread(databaseName, searchFilter, typesFilter); } @@ -133,6 +132,12 @@ public class TableViewList extends UIList { } } + private void clearCache(Connection datasource, String schema) { + DataCoreUtils.refreshTables(datasource, TableProcedure.TABLE, schema); + DataCoreUtils.refreshTables(datasource, TableProcedure.VIEW, schema); + DataCoreUtils.refreshTables(datasource, TableProcedure.PROCEDURE, schema); + } + /** * august:databaseName是数据库名字,searchFilter是输入的过滤条件,typesFilter是视图、表、 * 存储过程中的一者或者几者