Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

feat: integrate limit to last#145

Merged
rafilong merged 3 commits into
googleapis:v2-stagingfrom
rafilong:integrate-limit-to-last
Aug 7, 2020
Merged

feat: integrate limit to last#145
rafilong merged 3 commits into
googleapis:v2-stagingfrom
rafilong:integrate-limit-to-last

Conversation

@rafilong

@rafilong rafilong commented Aug 6, 2020

Copy link
Copy Markdown
Contributor

Integrate changes from #57 to the async client.

@rafilong rafilong added this to the v2 milestone Aug 6, 2020
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 6, 2020

@BenWhitehead BenWhitehead left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for porting this over! Deferring to @crwilcox for final approval.

Comment thread google/cloud/firestore_v1/async_collection.py
Comment thread google/cloud/firestore_v1/async_query.py
Comment thread google/cloud/firestore_v1/collection.py

async for _ in get_response:
pass
get_response = await collection.get()

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.

how does this map to the sync version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same functionality, now neither are Iterator/Generator/AsyncGenerators. Both aggregate results so they can be reversed and return a list, though the async function is a coroutine that has that functionality.

@rafilong rafilong merged commit 55da695 into googleapis:v2-staging Aug 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

3 participants