Skip to content

Fix collection and query iterable issue - #4

Merged
flrngel merged 3 commits into
ainbr:masterfrom
Some1Somewhere:fix-collection-and-query-iterable-issue
Feb 16, 2026
Merged

Fix collection and query iterable issue#4
flrngel merged 3 commits into
ainbr:masterfrom
Some1Somewhere:fix-collection-and-query-iterable-issue

Conversation

@Some1Somewhere

Copy link
Copy Markdown

What this PR fixes

Solves #51.

Bug – CollectionReference.get() returned the raw generator produced by stream().

In real google-cloud-firestore, get() is eager: it materialises the stream and returns a list[DocumentSnapshot].

Consuming code that expected parity (e.g. len(col.get()) or random-index access) raised TypeError: object of type 'generator' has no len().

Backward Compatibility

No breaking changes. Existing code that already consumed the generator continues to work (list(col.get()) still returns a list). Only incorrect behaviour is corrected.

@flrngel
flrngel merged commit 1b44287 into ainbr:master Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants