-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Firestore: Add support for using snapshot cursors in collection group queries. #8810
Conversation
@@ -257,7 +257,7 @@ def collection_group(self, collection_id): | |||
) | |||
|
|||
collection = self.collection(collection_id) | |||
return query.Query(collection, all_descendants=True) | |||
return query.Query(collection, all_descendants=True, is_group=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all_descendants
already implies a collection group query. We shouldn't need is_group
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a guess, but wasn't 100% sure about all_descendants
. I propose to rephrase comment in Query
:
all_descendants (Optional[bool]):
When false, selects only collections that are immediate children
of the `parent` specified in the containing `RunQueryRequest`.
When true, selects all descendant collections.
In collection_group()
comment we can see tip about last segments of collection's path:
Every collection or subcollection with this ID as the last segment of its
path will be included.
So, I think, query's comment should be alike collection_group
's one, 'cause first time I treated it as building down-tree from the specified particular collection
01f4da1
to
3fedc31
Compare
Add helper Add arg to understand, when we're in group Add requested changes Nox Delete argument
50b5292
to
7ab91ba
Compare
Superseded by #8882. |
Towards: #8633
I'd propose something like that, though the idea of using snapshot after
collection_group()
seems wrong to me. Ascollection_group()
includes all collections, which last segment is equal with given collection id, snapshot will be used for different collections, and as exception says it shouldn't be