Skip to content

Commit 6ad5dd6

Browse files
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

5 files changed

+1427
-2
lines changed

packages/googleapis_firestore/lib/googleapis_firestore.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ export 'src/firestore.dart'
4949
DocumentChangeType,
5050
Precondition,
5151
TransactionHandler,
52-
SetOptions;
52+
SetOptions,
53+
BundleBuilder;

0 commit comments

Comments
 (0)