DocumentReference
A DocumentReference
refers to a document location in a Firestore database
and can be used to write, read, or listen to the location. The document at
the referenced location may or may not exist.
§Type Parameters
§Properties
If provided, the FirestoreDataConverter
associated with this instance.
A string representing the path of the referenced document (relative to the root of the database).
The collection this DocumentReference
belongs to.
§Methods
Returns a JSON-serializable representation of this DocumentReference
instance.
a JSON representation of this object.
Applies a custom data converter to this DocumentReference
, allowing you
to use your own custom model objects with Firestore. When you call {@link
- Converts objects to and from Firestore.
A DocumentReference
that uses the provided converter.
Removes the current converter.
null
removes the current converter.
A DocumentReference<DocumentData, DocumentData>
that does not
use a converter.
§Static Methods
Builds a DocumentReference
instance from a JSON object created by
DocumentReference.toJSON.
- The Firestore instance the snapshot should be loaded for.
a JSON object represention of a DocumentReference
instance
an instance of DocumentReference if the JSON object could be parsed. Throws a FirestoreError if an error occurs.
Builds a DocumentReference
instance from a JSON object created by
DocumentReference.toJSON.
- The Firestore instance the snapshot should be loaded for.
a JSON object represention of a DocumentReference
instance
- Converts objects to and from Firestore.
an instance of DocumentReference if the JSON object could be parsed. Throws a FirestoreError if an error occurs.