Packagecom.distriqt.extension.firebase.firestore
Classpublic class DocumentSnapshot
InheritanceDocumentSnapshot Inheritance Object

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 Methods
 MethodDefined By
  
DocumentSnapshot
  
exists():Boolean
DocumentSnapshot
  
fromObject(data:Object, ref:DocumentReference, store:_ReferenceStore = null):DocumentSnapshot
[static]
DocumentSnapshot
  
getData():Object
Returns the fields of the document or null if the document doesn't exist.
DocumentSnapshot
  
The metadata for this document snapshot
DocumentSnapshot
  
Gets the reference to the document
DocumentSnapshot
  
toObject():Object
DocumentSnapshot
Constructor Detail
DocumentSnapshot()Constructor
public function DocumentSnapshot()



Method Detail
exists()method
public function exists():Boolean

Returns
Booleantrue if the document existed in this snapshot
fromObject()method 
public static function fromObject(data:Object, ref:DocumentReference, store:_ReferenceStore = null):DocumentSnapshot

Parameters

data:Object
 
ref:DocumentReference
 
store:_ReferenceStore (default = null)

Returns
DocumentSnapshot
getData()method 
public function getData():Object

Returns the fields of the document or null if the document doesn't exist.

Returns
Object
getMetadata()method 
public function getMetadata():SnapshotMetadata

The metadata for this document snapshot

Returns
SnapshotMetadata
getReference()method 
public function getReference():DocumentReference

Gets the reference to the document

Returns
DocumentReference
toObject()method 
public function toObject():Object

Returns
Object