A DocumentSnapshot contains data read from a document in your Firestore database.
The data can be extracted with the getData() methods.
If the DocumentSnapshot points to a non-existing document, getData() and its corresponding methods will return null.
You can always explicitly check for a document's existence by calling exists().
public function DocumentSnapshot()
public function exists():Boolean
Returns | Boolean — true if the document existed in this snapshot
|
public static function fromObject(data:Object, ref:DocumentReference, store:_ReferenceStore = null):DocumentSnapshot
Parameters
Returns public function getData():Object
Returns the fields of the document or null if the document doesn't exist.
Returns public function getMetadata():SnapshotMetadata
The metadata for this document snapshot
Returns public function getReference():DocumentReference
Gets the reference to the document
Returns public function toObject():Object
Returns
Thu Feb 13 2025, 11:18 AM +10:00