The databse to use to store data
Collection path with mustache document ids (e.g. lists/{lists}/items)
The bucket where files will be stored
List of sub daos used
Override this method to execute actions before saving document in database
the document to save
id or location (pathIds) where the document will be saved
Promise with the document that will be saved instead of the input one
Create subdocuments (even empty ones)
Subdocument data
Location of parent document
Create options
Delete a model by its reference
Document reference
Override this method to delete files from somewhere else than in firestore storage
File object containing the file to delete
extract from main model data intended to sub model
main model data
Get a model from database from id or location
id or location of the document in database
(withSnapshot, completeOnFirst, cacheable)
asynchronous answer with model
Get a model from database from its path
String path to the document in database
(withSnapshot, completeOnFirst, cacheable)
asynchronous answer with model
Get a model from database from its reference
Document reference
(withSnapshot, completeOnFirst, cacheable)
asynchronous answer with model
Get a list of documents in the collection
List of path ids
(withSnapshot, completeOnFirst, where, orderBy, limit, offset, cacheable)
Convert a database document snapshot to a model
Database document snapshot
Model
Rebuild a model with data from subdocuments
The main model
Options to apply to fetch subdocs
Get a new instance of model M
Data to inject in this model
Location of the model in database
new model
Get a reference from a compatible path
The path for which get a reference
a CollectionReference or a documentReference depending on the path param
Get a document snapshot from database from an id or a location
id or location (pathIds)
(where, orderBy, limit, offset, cacheable)
Async answer with the snapshot
Fetch all subdocs
Location of the parent document
Options to apply to fetch one subdoc
Create all sub daos used
Creates one sub dao
path used by the sub dao
Check if the model or reference is compatible with this DAO based on its path
Model or reference to chheck
Override this method to save files somewhere else than in firestore storage
File object containing the file to save
id or location (pathIds) of the document containing the file object
Promise of the file object containing storage informations
Update subdocuments the same way normal update does
Subdocument data
Location of the parent document
Update options
Generated using TypeDoc
Abstract Flattable DAO class