Skip to content

Commit

Permalink
vdk-core: handle fetchall errors for oracledb (#2917)
Browse files Browse the repository at this point in the history
## Why?

vdk-oracle needs to be able to execute querieswithing 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 <[email protected]>
  • Loading branch information
DeltaMichael authored Nov 20, 2023
1 parent 6c7169e commit 7737cdd
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)."
Expand Down

0 comments on commit 7737cdd

Please sign in to comment.