Globals
Abstract types
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 |
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 |
A query snapshot. |
ReadOptions
Object
An options object that can be used to configure the behavior of
getAll() calls. By providing a fieldMask
, these calls can be configured to only return a subset of fields.
Property
Parameter |
|
---|---|
fieldMask |
Array of (string or FieldPath) Specifies the set of fields to return and reduces the amount of data transmitted by the backend. Adding a field mask does not filter results. Documents do not need to contain values for all the fields in the mask to be part of the result set. |
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 }.
Properties
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. |
mergeFields |
Array of (string or FieldPath) Changes the behavior of set() calls to only replace the specified field paths. Any field path that is not specified is ignored and remains untouched. It is an error to pass a SetOptions object to a set() call that is missing a value for any of the fields specified here. |
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.