ReadonlyexistsTrue if the document exists.
ReadonlyidThe ID of the document for which this DocumentSnapshot contains data.
ReadonlymetadataMetadata about this snapshot concerning its source and if it has local modifications.
ReadonlyrefA DocumentReference to the document location.
Retrieves all fields in the document as an Object.
An Object containing all fields in the document.
Retrieves the field specified.
Field value or null.
Checks whether this DocumentSnapshot is equal to the provided one.
Snapshot to compare.
True if equal, false otherwise.
A
QueryDocumentSnapshotcontains data read from a document in your database as part of a query. The document is guaranteed to exist and its data can be extracted with.data()or.get(<field>)to get a specific field.A
QueryDocumentSnapshotoffers the same API surface as aDocumentSnapshot. Since query results contain only existing documents, theexistsproperty will always be true anddata()will never return 'undefined'.