prorm API Reference
    Preparing search index...

    Class FirestoreStore

    Base interface for NoSQL stores.

    NoSQL engines (document stores, key-value caches, partition-key stores) do not share the SQL-shaped Dialect interface (no query(sql), no identifier escaping, no DDL). NoSqlStore is intentionally minimal: connection lifecycle plus a raw escape hatch. Each store's real API surface (find/insert/update for Mongo, hash/list/set ops for Redis, item CRUD for DynamoDB) lives on its own class, not on this interface, because forcing them into one shared query shape would misrepresent what each engine can actually do.

    Implements

    Index
    name: "firestore" = 'firestore'

    The name of the store (e.g. 'mongodb', 'redis', 'dynamodb')

    library: "@google-cloud/firestore" = '@google-cloud/firestore'

    The client library being used

    • Add a document to collection. If doc.id is set the document is written to that id via doc(id).set(doc); otherwise Firestore auto-assigns one via collection.add(doc). Returns the resulting document id.

      Parameters

      • collection: string
      • doc: Record<string, unknown>

      Returns Promise<unknown>

    • Fetch a document by id, returning its data (or undefined if missing).

      Parameters

      • collection: string
      • id: string

      Returns Promise<unknown>

    • Partially update a document by id, returning the applied patch.

      Parameters

      • collection: string
      • id: string
      • patch: Record<string, unknown>

      Returns Promise<unknown>

    • Delete a document by id.

      Parameters

      • collection: string
      • id: string

      Returns Promise<unknown>

    • Query collection. filter may be an array of [field, op, value] conditions or a plain object (treated as equality on each key). Returns the matched documents, each shaped as { id, ...data }.

      Parameters

      • collection: string
      • filter: Record<string, unknown> | FirestoreCondition[] = {}

      Returns Promise<unknown[]>