Skip to content

Feat/document snapshot data size #2197

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ehsannas
Copy link
Contributor

No description provided.

google-labs-jules bot and others added 4 commits July 1, 2025 16:43
This method calculates and returns the total size of the data stored in the DocumentSnapshot in bytes.

- Iterates through the protobuf `Value` messages in the `fields` map.
- Sums the `getSerializedSize()` of each `Value`.
- Returns 0 if the document does not exist (fields is null).
This method calculates and returns the total size of the data stored in the DocumentSnapshot in bytes.

- Iterates through the protobuf `Value` messages in the `fields` map.
- Sums the `getSerializedSize()` of each `Value`.
- Returns 0 if the document does not exist (fields is null).

Split the test case for `getDataSize` into two separate tests for existing and non-existent documents as per review feedback.
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: firestore Issues related to the googleapis/java-firestore API. labels Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/java-firestore API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants