Skip to content

Conversation

@dhermes
Copy link
Contributor

@dhermes dhermes commented Nov 8, 2016

I considered

  • Making offset and end_cursor read-only public properties on the subclass
  • Making a @property alias start_cursor that just returns the value of next_page_token
  • Making a @property alias limit that just returns the value of max_results

I elected not to make anything new public since the original implementation didn't.

@jonparrott PTAL as well (do you think this will be too jarring a change?).

@dhermes dhermes added api: datastore Issues related to the Datastore API. api: core labels Nov 8, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 8, 2016
Using the query iterator's
:meth:`~google.cloud.datastore.query.Iterator.next_page` method:
Using the query iterator

This comment was marked as spam.

This comment was marked as spam.

@dhermes dhermes force-pushed the migrate-datastore-iterator branch 2 times, most recently from 22578a8 to 0bc7682 Compare November 8, 2016 18:02
@theacodes
Copy link
Contributor

@dhermes thanks, the same is clear and doesn't make a common use case too difficult. I'm cool with this.

@dhermes dhermes force-pushed the migrate-datastore-iterator branch from 0bc7682 to 7a97e00 Compare November 8, 2016 20:39
@dhermes
Copy link
Contributor Author

dhermes commented Nov 8, 2016

@daspecster @tseaver PTAL

>>> query_iter.next_page_token is None
True
Under the hood this is doing:

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@daspecster daspecster left a comment

Choose a reason for hiding this comment

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

This LGTM to me as well.

@dhermes
Copy link
Contributor Author

dhermes commented Nov 9, 2016

Going to merge (waiting waited 24h for other feedback)

@dhermes dhermes merged commit 1abfcbe into googleapis:master Nov 9, 2016
@dhermes dhermes deleted the migrate-datastore-iterator branch November 9, 2016 17:08
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…rator

Migrate datastore iterator to use base iterator class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: core api: datastore Issues related to the Datastore API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants