Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue where response was an embedded json string #1

Merged
merged 2 commits into from
Dec 22, 2023
Merged

Conversation

jbirddog
Copy link
Contributor

Fixes an issue when calling a stored procedure such as SELECT get_vendors(); via the DoSQL command and using fetch_results: True the results would be an embedded json string instead of an object in task data. Fix is to munge the string which represents a row returned from the stored procedure. If the string parsing fails the greater exception handling will return an error.

@@ -66,8 +65,8 @@ def handler(conn: Any, cursor: Any) -> None:
return self._execute(sql, conn_str, handler)

def fetchall(self, sql: str, conn_str: str, values: list) -> ConnectorProxyResponseDict:
def prep_results(results: dict) -> list:
return list(map(list, results))
def prep_results(results: list) -> list:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you possibly add an example input and output or something along those lines to show what this is doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np, updated.

@jbirddog jbirddog merged commit 851001e into main Dec 22, 2023
3 checks passed
@jbirddog jbirddog deleted the fetch_all_bug branch December 22, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants