Properties

createTime

nullable Timestamp

The date the document was created, formatted as a Timestamp.

exists

boolean

Returns true if this DocumentSnapshot contains any data.

id

string

Extracts a document ID from a DocumentSnapshot.

readTime

nullable Timestamp

The last time the document was read, formatted as a Timestamp.

ref

non-null firestore.DocumentReference

Returns a DocumentReference to the database location where the triggering write occurred. This DocumentReference has admin privileges.

updateTime

nullable Timestamp

The last update time for the document, formatted as a Timestamp.

Methods

data

data() returns any type

Returns the data fields in their state after the triggering write event has occurred.

Returns

any type 

get

get(Key) returns any type

Gets the value for a given key.

Parameter

Key

string

The parameter supplied for this method must be the key of the data to retrieve.

Returns

any type The data value for the given key.