Commit a23710e
committed
refactor(firestore): standalone googleapis_firestore package and multi-db support for firestore (#121)
* docs: update documentation link for sending messages to topic conditions
* refactor: update constructors to use internal factory methods for AppCheck, Auth, Firestore, Messaging, and SecurityRules
* update README
* wip refactor google_cloud_firestore into its own package
* wip refactor google_cloud_firestore files to streamline package structure
* refactor: rename files and update imports for googleapis_firestore package
* docs: add googleapis_firestore package documentation section to index.html
* feat: add multi-database support to Firestore
This change refactors the Firestore integration to support multiple databases within a single `FirebaseApp`, similar to the Node.js Admin SDK.
Key changes:
- `app.firestore()` now accepts an optional `databaseId` to get or create a named database instance.
- Database instances are cached per `databaseId` to ensure the same instance is returned on subsequent calls.
- The `Firestore` service wrapper now manages multiple `googleapis_firestore.Firestore` delegates, one for each database ID.
- Settings are now passed during initialization via `app.firestore(settings: ...)`, and re-initialization with different settings is prevented.
- Added comprehensive unit and integration tests for multi-database functionality, CRUD operations, and emulator support.
- Refactored `EmulatorClient` into the `googleapis_firestore` package and removed redundant exception handling code.
* docs: update README.md with Firestore usage examples and corrections
* chore: fix lint errors
* feat: enhance Firestore example with multi-database support and usage scenarios
* feat: add googleapis_firestore dependency to pubspec.yaml
* feat: add failedPrecondition error code and update error messages in Firestore
* chore: comment out local Firestore emulator configuration in coverage script
* refactor(firestore): simplify and improve firestore tests1 parent dfbe31e commit a23710e
File tree
3 files changed
+3
-0
lines changed- packages/googleapis_firestore/lib/src
3 files changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| 915 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
0 commit comments