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

feat: return list of dictionaries for execute streaming sql #1003

Merged
merged 8 commits into from
Oct 25, 2023

Conversation

asthamohta
Copy link
Contributor

No description provided.

@asthamohta asthamohta requested review from a team as code owners August 17, 2023 06:27
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/python-spanner API. labels Aug 17, 2023
google/cloud/spanner_v1/streamed.py Outdated Show resolved Hide resolved
google/cloud/spanner_v1/streamed.py Show resolved Hide resolved
@@ -190,6 +190,19 @@ def one_or_none(self):
except StopIteration:
return answer

def fetch_as_dictionary_list(self):
rows = []
for row in self:
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens if rows are not fully processed when this method is called ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There will be a delay in returning the result in those cases but always the full result will be returned

@asthamohta asthamohta enabled auto-merge (squash) September 28, 2023 06:23
@asthamohta asthamohta merged commit b534a8a into googleapis:main Oct 25, 2023
11 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there an option to return execute_sql results as a list of dictionaries?
3 participants