FirestoreServerProviderclass
new FirestoreServerProvider<I, T>(firestore = new Firestore())
| Param | Type | |
|---|---|---|
firestore | unknown | The Firestore instance to read and write through; defaults to a new Firestore(). Defaults to new Firestore() |
| Return | |
|---|---|
FirestoreServerProvider<I, T> | Cloud Firestore database provider backed by the Firebase Admin SDK, implementing the DBProvider abstraction. |
Cloud Firestore database provider backed by the Firebase Admin SDK, implementing the DBProvider abstraction.
- Runs server-side via
@google-cloud/firestore(the Firebase Admin SDK for Node.JS). - Supports realtime subscriptions through Firestore
onSnapshotlisteners. - Collection writes (
setQuery,updateQuery,deleteQuery) are batched through a FirestoreBulkWriter.
Examples
import { Firestore } from "@google-cloud/firestore";
const provider = new FirestoreServerProvider(new Firestore());