From 826ac25bcddb69e251bdd65979f3e7af72220cbc Mon Sep 17 00:00:00 2001 From: Dilyan Marinov Date: Fri, 17 Nov 2023 16:10:13 +0200 Subject: [PATCH] vdk-core: handle fetchall errors for oracledb Why? vdk-oracle needs to be able to execute queries withing the vdk-framework. This requires oracle specifics to be supported inside managed_connection_base What? Add the oracle exception message for fetchall getting called after queries that do not return a result, e.g. DROP TABLE How was this tested? Ran locally using the dev version of vdk-oracle What kind of change is this? feature/non-breaking Signed-off-by: Dilyan Marinov --- .../builtin_plugins/connection/managed_connection_base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_connection_base.py b/projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_connection_base.py index 3a34d3326a..18a53b57d5 100644 --- a/projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_connection_base.py +++ b/projects/vdk-core/src/vdk/internal/builtin_plugins/connection/managed_connection_base.py @@ -138,6 +138,7 @@ def execute_query(self, query: str) -> List[List[Any]]: "No results. Previous SQL was not a query.", # message in pyodbc "Trying to fetch results on an operation with no results.", # message in impyla "no results to fetch", # psycopg: ProgrammingError: no results to fetch + "DPY-1003: the executed statement does not return rows", # oracledb ): self._log.debug( "Fetching all results from query SUCCEEDED. Query does not produce results (e.g. DROP TABLE)."