FirestoreServerProviderclass

new FirestoreServerProvider<I, T>(firestore = new Firestore())
ParamType
firestoreunknown
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 onSnapshot listeners.
  • Collection writes (setQuery, updateQuery, deleteQuery) are batched through a Firestore BulkWriter.

Examples

import { Firestore } from "@google-cloud/firestore";
const provider = new FirestoreServerProvider(new Firestore());