Skip to content
Permalink
Browse files

#6286 Generic driver: procedure type detect fix

  • Loading branch information...
serge-rider committed Aug 13, 2019
1 parent 0e533f6 commit 67e2f7b2d6fe22fa8391bc62f81af7c3f79bd43d
@@ -223,6 +223,8 @@ public void loadProcedures(DBRProgressMonitor monitor, @NotNull GenericObjectCon
{
Map<String, GenericPackage> packageMap = null;

Map<String, GenericProcedure> funcMap = new LinkedHashMap<>();

GenericDataSource dataSource = container.getDataSource();
GenericMetaObject procObject = dataSource.getMetaObject(GenericConstants.OBJECT_PROCEDURE);
try (JDBCSession session = DBUtils.openMetaSession(monitor, container, "Load procedures")) {
@@ -275,6 +277,8 @@ public void loadProcedures(DBRProgressMonitor monitor, @NotNull GenericObjectCon
DBSProcedureType.FUNCTION,
functionResultType);
container.addProcedure(procedure);

funcMap.put(specificName == null ? functionName : specificName, procedure);
}
}
finally {
@@ -318,6 +322,12 @@ public void loadProcedures(DBRProgressMonitor monitor, @NotNull GenericObjectCon
if (CommonUtils.isEmpty(specificName)) {
specificName = procedureName;
}
GenericProcedure function = funcMap.get(specificName);
if (function != null) {
// Broken driver
log.debug("Broken driver [" + session.getDataSource().getContainer().getDriver().getName() + "] - returns the same list for getProcedures and getFunctons");
break;
}
procedureName = GenericUtils.normalizeProcedureName(procedureName);

GenericPackage procedurePackage = null;

0 comments on commit 67e2f7b

Please sign in to comment.
You can’t perform that action at this time.