FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Spanner: Make rows, consume_all and consume_next private by chemelnucfin · Pull Request #4492 · googleapis/google-cloud-python · GitHub

Spanner: Make rows, consume_all and consume_next private - #4492

Merged
chemelnucfin merged 4 commits into
googleapis:masterfrom
chemelnucfin:spanner_rows_rename
Dec 13, 2017
Merged

Spanner: Make rows, consume_all and consume_next private#4492
chemelnucfin merged 4 commits into
googleapis:masterfrom
chemelnucfin:spanner_rows_rename

Conversation

chemelnucfin commented Nov 29, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

See #4414 and #4204

googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 29, 2017
chemelnucfin added api: spanner Issues related to the Spanner API. type: cleanup An internal cleanup or hygiene concern. labels Nov 29, 2017

Copy link
Copy Markdown
Contributor Author

@tseaver PTAL, thanks.

def __init__(self, response_iterator, source=None):
self._response_iterator = response_iterator
self._rows = [] # Fully-processed rows
self._processed_rows = [] # Fully-processed rows

This comment was marked as spam.

Comment thread spanner/tests/system/test_system.py Outdated
while True:
try:
streamed.consume_next()
streamed._consume_next()

This comment was marked as spam.

Comment thread spanner/tests/system/test_system.py Outdated
retrieved += len(streamed.rows)
streamed.rows[:] = ()
retrieved += len(streamed._rows)
streamed._rows[:] = ()

This comment was marked as spam.

tseaver left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let's just delete the two system tests: they are redundant with those in other testcases.


@property
def rows(self):
def _rows(self):

This comment was marked as spam.

self._merge_values(values)

def consume_all(self):
def _consume_all(self):

This comment was marked as spam.

Copy link
Copy Markdown
Contributor Author

@vkedia @tseaver PTAL, thanks.

Comment thread spanner/tests/unit/test_snapshot.py Outdated
self.assertIsNone(result_set._source)

result_set._consume_all()
# result_set._consume_all()

This comment was marked as spam.

This comment was marked as spam.

# result_set._consume_all()

self.assertEqual(list(result_set._rows), VALUES)
self.assertEqual(list(result_set), VALUES)

This comment was marked as spam.

Copy link
Copy Markdown
Contributor Author

I just changed the _rows to list. I will put that in another PR.

chemelnucfin merged commit 460b606 into googleapis:master Dec 13, 2017
chemelnucfin deleted the spanner_rows_rename branch December 13, 2017 21:34
tseaver mentioned this pull request Jan 10, 2018
parthea pushed a commit that referenced this pull request Mar 9, 2026
* Spanner: Make rows, consume_all and consume_next private

* review changes

* Spanner: remove _consume_all and _rows methods

* Spanner: delete unnecessary tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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 Spanner API. cla: yes This human has signed the Contributor License Agreement. type: cleanup An internal cleanup or hygiene concern.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL