Protected_Protected_Protected_StaticPKEY_The reserved field path identifier for a document's primary key in Firestore.
Protected_Resolves the canonical database path for a record, respecting standard collection structures and hierarchical subcollection configurations.
Optionaluid: stringProtected_Protected_Processes raw data entries to convert relational reference objects into native database foreign key IDs
if the adapter has been configured with useNativeForeignKeys = true.
Executes an aggregation operation (sum, avg, distinct, min, max, count) on a query. The default implementation fetches all matching records and performs in-memory aggregation. Specific database adapters should override this to perform native query aggregation.
The Query instance defining the collection and filters.
The aggregate operation.
Optionalproperty: stringThe name of the property to aggregate.
A promise resolving to the aggregated result.
Create record in backend
DataObject instance to persist in backend
DataObject
Removes a document from Firestore.
If softDelete is enabled in backend parameters and hardDelete is false,
it updates the document's status to DELETED instead of destroying the record.
The DataObject representing the document to delete.
Force absolute removal even if softDelete is globally enabled.
A promise resolving to the processed DataObject (with cleared URI if hard deleted).
Completely obliterates an entire collection by batch-deleting all its documents recursively. Use with extreme caution.
The name of the root collection to delete.
The number of documents to delete per transaction chunk.
A promise resolving when the collection is empty.
Removes a middleware from the pipeline by its class name.
The exact name of the middleware class to remove.
Orchestrates the sequential execution of all attached middlewares for a given action.
The payload traversing the middlewares.
The context (READ, CREATE, UPDATE, DELETE).
Whether to run the before or after pipeline.
Optionalparams: MiddlewareParamsOptional parameters passed down to the middlewares.
A promise resolving to the potentially mutated DataObject.
Execute a query on a collection
Helper method to extract the destination collection name from a DataObject.
The DataObject evaluating the context.
The resolved collection string.
Retrieves a specific configuration parameter.
The parameter key to fetch.
The value associated with the key, or undefined.
Returns true if a given middleware is attached
boolean
Process Query instance and return result
Array
Executes a raw query on the backend. Only supported by SQL adapters.
Optionalparams: any[]Retrieves a document from Firestore by its path and populates the given DataObject.
The target DataObject containing the path/UID to fetch.
A promise resolving to the populated DataObject.
Overrides or adds a backend configuration parameter dynamically.
The parameter key to modify.
The new value to assign.
Updates an existing document in Firestore with the current state of the DataObject. Executes attached middlewares before and after the transaction.
The DataObject containing the updated payload.
A promise resolving to the updated DataObject.
Backend adapter implementation for Google Cloud Firestore. Maps Quatrain's DataObjects and Queries to Firestore documents and collections. Inherits all baseline CRUD and Query logic from
AbstractBackendAdapter.