Commit 6ad5dd6
committed
feat: add support for Firestore data bundles
This commit introduces the `BundleBuilder` class, which allows for the creation of Firestore data bundles. Bundles can include document snapshots and named query snapshots.
The `BundleBuilder` serializes these elements into a length-prefixed JSON format that can be served to clients for pre-loading data, enabling faster initial load times and offline access.
The implementation includes:
- `BundleBuilder` to add documents and queries.
- `build()` method to generate the final `Uint8List` bundle.
- Internal models for bundle elements (`BundleMetadata`, `BundledDocumentMetadata`, `NamedQuery`, etc.).
- Helper methods for JSON serialization of Firestore types.
- New unit and integration tests for the bundling functionality.1 parent 76b0816 commit 6ad5dd6
File tree
5 files changed
+1427
-2
lines changed- packages/googleapis_firestore
- lib
- src
- test
5 files changed
+1427
-2
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
| 53 | + | |
0 commit comments