Globals

Abstract types

changeCallback

changeCallback() returns Array of DocumentChange

Returns

Array of DocumentChange 

An ordered list of document changes.

docsCallback

docsCallback() returns Array of QueryDocumentSnapshot

Returns

Array of QueryDocumentSnapshot 

An ordered list of documents.

DocumentData

Object with any type properties

Document data (e.g. for use with set()) consisting of fields mapped to values.

documentSnapshotCallback

documentSnapshotCallback(snapshot)

onSnapshot() callback that receives a DocumentSnapshot.

Parameter

snapshot

DocumentSnapshot

A document snapshot.

errorCallback

errorCallback(err)

onSnapshot() callback that receives an error.

Parameter

err

Error

An error from a listen.

Precondition

Object

An options object that configures conditional behavior of update() and delete() calls in DocumentReference, WriteBatch, and Transaction. Using Preconditions, these calls can be restricted to only apply to documents that match the specified conditions.

Property

Parameter

lastUpdateTime

string

The update time to enforce (specified as an ISO 8601 string).

querySnapshotCallback

querySnapshotCallback(snapshot)

onSnapshot() callback that receives a QuerySnapshot.

Parameter

snapshot

QuerySnapshot

A query snapshot.

SetOptions

Object

An options object that configures the behavior of set() calls in DocumentReference, WriteBatch, and Transaction. These calls can be configured to perform granular merges instead of overwriting the target documents in their entirety by providing a SetOptions object with { merge : true }.

Property

Parameter

merge

boolean

Changes the behavior of a set() call to only replace the values specified in its data argument. Fields omitted from the set() call remain untouched.

UpdateData

Object with any type properties

Update data (for use with update) that contains paths (e.g. 'foo' or 'foo.baz') mapped to values. Fields that contain dots reference nested fields within the document.