Browse Source

Pull request #3661: REPORT-48046 额外删除schema为null的缓存

Merge in DESIGN/design from ~XIQIU/design:final/10.0 to final/10.0

* commit 'd9f6172f089321a49574e7d637a870d35a8498c1':
  REPORT-48046    额外删除schema为null的缓存
final/10.0
Kara 4 years ago
parent
commit
3951c421ad
  1. 11
      designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java

11
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);
}
/**
* augustdatabaseName是数据库名字searchFilter是输入的过滤条件,typesFilter是视图
* 存储过程中的一者或者几者

Loading…
Cancel
Save