Members
(static) Direction :number
A sort direction.
Properties:
Name | Type | Description |
---|---|---|
DIRECTION_UNSPECIFIED |
number |
Unspecified. |
ASCENDING |
number |
Ascending. |
DESCENDING |
number |
Descending. |
(static) Operator :number
A composite filter operator.
Properties:
Name | Type | Description |
---|---|---|
OPERATOR_UNSPECIFIED |
number |
Unspecified. This value must not be used. |
AND |
number |
The results are required to satisfy each of the combined filters. |
(static) Operator :number
A unary operator.
Properties:
Name | Type | Description |
---|---|---|
OPERATOR_UNSPECIFIED |
number |
Unspecified. This value must not be used. |
IS_NAN |
number |
Test if a field is equal to NaN. |
IS_NULL |
number |
Test if an expression evaluates to Null. |
(static) Operator :number
A field filter operator.
Properties:
Name | Type | Description |
---|---|---|
OPERATOR_UNSPECIFIED |
number |
Unspecified. This value must not be used. |
LESS_THAN |
number |
Less than. Requires that the field come first in |
LESS_THAN_OR_EQUAL |
number |
Less than or equal. Requires that the field come first in |
GREATER_THAN |
number |
Greater than. Requires that the field come first in |
GREATER_THAN_OR_EQUAL |
number |
Greater than or equal. Requires that the field come first in
|
EQUAL |
number |
Equal. |
ARRAY_CONTAINS |
number |
Contains. Requires that the field is an array. |
IN |
number |
In. Requires that |
ARRAY_CONTAINS_ANY |
number |
Contains any. Requires that the field is an array and
|
(static) ServerValue :number
A value that is calculated by the server.
Properties:
Name | Type | Description |
---|---|---|
SERVER_VALUE_UNSPECIFIED |
number |
Unspecified. This value must not be used. |
REQUEST_TIME |
number |
The time at which the server processed the request, with millisecond precision. |
(static) TargetChangeType :number
The type of change.
Properties:
Name | Type | Description |
---|---|---|
NO_CHANGE |
number |
No change has occurred. Used only to send an updated |
ADD |
number |
The targets have been added. |
REMOVE |
number |
The targets have been removed. |
CURRENT |
number |
The targets reflect all changes committed before the targets were added to the stream. This will be sent after or with a Listeners can wait for this change if read-after-write semantics are desired. |
RESET |
number |
The targets have been reset, and a new initial state for the targets will be returned in subsequent changes. After the initial state is complete, |
Type Definitions
ArrayValue
An array value.
Properties:
Name | Type | Description |
---|---|---|
values |
Array.<Object> |
Values in the array. This object should have the same structure as Value |
- Source:
- See:
BatchGetDocumentsRequest
The request for Firestore.BatchGetDocuments.
Properties:
Name | Type | Description |
---|---|---|
database |
string |
The database name. In the format:
|
documents |
Array.<string> |
The names of the documents to retrieve. In the format:
|
mask |
Object |
The fields to return. If not set, returns all fields. If a document has a field that is not present in this mask, that field will not be returned in the response. This object should have the same structure as DocumentMask |
transaction |
Buffer |
Reads documents in a transaction. |
newTransaction |
Object |
Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream. This object should have the same structure as TransactionOptions |
readTime |
Object |
Reads documents as they were at the given time. This may not be older than 60 seconds. This object should have the same structure as Timestamp |
- Source:
- See:
BatchGetDocumentsResponse
The streamed response for Firestore.BatchGetDocuments.
Properties:
Name | Type | Description |
---|---|---|
found |
Object |
A document that was requested. This object should have the same structure as Document |
missing |
string |
A document name that was requested but does not exist. In the format:
|
transaction |
Buffer |
The transaction that was started as part of this request. Will only be set in the first response, and only if BatchGetDocumentsRequest.new_transaction was set in the request. |
readTime |
Object |
The time at which the document was read. This may be monotically increasing, in this case the previous documents in the result stream are guaranteed not to have changed between their read_time and this one. This object should have the same structure as Timestamp |
- Source:
- See:
BeginTransactionRequest
The request for Firestore.BeginTransaction.
Properties:
Name | Type | Description |
---|---|---|
database |
string |
The database name. In the format:
|
options |
Object |
The options for the transaction. Defaults to a read-write transaction. This object should have the same structure as TransactionOptions |
- Source:
- See:
BeginTransactionResponse
The response for Firestore.BeginTransaction.
Properties:
Name | Type | Description |
---|---|---|
transaction |
Buffer |
The transaction that was started. |
- Source:
- See:
CollectionSelector
A selection of a collection, such as messages as m1
.
Properties:
Name | Type | Description |
---|---|---|
collectionId |
string |
The collection ID. When set, selects only collections with this ID. |
allDescendants |
boolean |
When false, selects only collections that are immediate children of
the |
- Source:
- See:
CommitRequest
The request for Firestore.Commit.
Properties:
Name | Type | Description |
---|---|---|
database |
string |
The database name. In the format:
|
writes |
Array.<Object> |
The writes to apply. Always executed atomically and in order. This object should have the same structure as Write |
transaction |
Buffer |
If set, applies all writes in this transaction, and commits it. |
- Source:
- See:
CommitResponse
The response for Firestore.Commit.
Properties:
Name | Type | Description |
---|---|---|
writeResults |
Array.<Object> |
The result of applying the writes. This i-th write result corresponds to the i-th write in the request. This object should have the same structure as WriteResult |
commitTime |
Object |
The time at which the commit occurred. This object should have the same structure as Timestamp |
- Source:
- See:
CompositeFilter
A filter that merges multiple other filters using the given operator.
Properties:
Name | Type | Description |
---|---|---|
op |
number |
The operator for combining multiple filters. The number should be among the values of Operator |
filters |
Array.<Object> |
The list of filters to combine. Must contain at least one filter. This object should have the same structure as Filter |
- Source:
- See:
CreateDocumentRequest
The request for Firestore.CreateDocument.
Properties:
Name | Type | Description |
---|---|---|
parent |
string |
The parent resource. For example:
|
collectionId |
string |
The collection ID, relative to |
documentId |
string |
The client-assigned document ID to use for this document. Optional. If not specified, an ID will be assigned by the service. |
document |
Object |
The document to create. This object should have the same structure as Document |
mask |
Object |
The fields to return. If not set, returns all fields. If the document has a field that is not present in this mask, that field will not be returned in the response. This object should have the same structure as DocumentMask |
- Source:
- See:
Cursor
A position in a query result set.
Properties:
Name | Type | Description |
---|---|---|
values |
Array.<Object> |
The values that represent a position, in the order they appear in the order by clause of a query. Can contain fewer values than specified in the order by clause. This object should have the same structure as Value |
before |
boolean |
If the position is just before or just after the given values, relative to the sort order defined by the query. |
- Source:
- See:
DeleteDocumentRequest
The request for Firestore.DeleteDocument.
Properties:
Name | Type | Description |
---|---|---|
name |
string |
The resource name of the Document to delete. In the format:
|
currentDocument |
Object |
An optional precondition on the document. The request will fail if this is set and not met by the target document. This object should have the same structure as Precondition |
- Source:
- See:
Document
A Firestore document.
Must not exceed 1 MiB - 4 bytes.
Properties:
Name | Type | Description |
---|---|---|
name |
string |
The resource name of the document, for example
|
fields |
Object.<string, Object> |
The document's fields. The map keys represent field names. A simple field name contains only characters Field names matching the regular expression Field paths may be used in other contexts to refer to structured fields
defined here. For Within a field path, a quoted field name starts and ends with |
createTime |
Object |
Output only. The time at which the document was created. This value increases monotonically when a document is deleted then
recreated. It can also be compared to values from other documents and
the This object should have the same structure as Timestamp |
updateTime |
Object |
Output only. The time at which the document was last changed. This value is initially set to the This object should have the same structure as Timestamp |
- Source:
- See:
DocumentChange
A Document has changed.
May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document.
Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected.
Properties:
Name | Type | Description |
---|---|---|
document |
Object |
The new state of the Document. If This object should have the same structure as Document |
targetIds |
Array.<number> |
A set of target IDs of targets that match this document. |
removedTargetIds |
Array.<number> |
A set of target IDs for targets that no longer match this document. |
- Source:
- See:
DocumentDelete
A Document has been deleted.
May be the result of multiple writes, including updates, the last of which deleted the Document.
Multiple DocumentDelete messages may be returned for the same logical delete, if multiple targets are affected.
Properties:
Name | Type | Description |
---|---|---|
document |
string |
The resource name of the Document that was deleted. |
removedTargetIds |
Array.<number> |
A set of target IDs for targets that previously matched this entity. |
readTime |
Object |
The read timestamp at which the delete was observed. Greater or equal to the This object should have the same structure as Timestamp |
- Source:
- See:
DocumentMask
A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document, and takes in account the dynamic nature of Value.
Properties:
Name | Type | Description |
---|---|---|
fieldPaths |
Array.<string> |
The list of field paths in the mask. See Document.fields for a field path syntax reference. |
- Source:
- See:
DocumentRemove
A Document has been removed from the view of the targets.
Sent if the document is no longer relevant to a target and is out of view. Can be sent instead of a DocumentDelete or a DocumentChange if the server can not send the new value of the document.
Multiple DocumentRemove messages may be returned for the same logical write or delete, if multiple targets are affected.
Properties:
Name | Type | Description |
---|---|---|
document |
string |
The resource name of the Document that has gone out of view. |
removedTargetIds |
Array.<number> |
A set of target IDs for targets that previously matched this document. |
readTime |
Object |
The read timestamp at which the remove was observed. Greater or equal to the This object should have the same structure as Timestamp |
- Source:
- See:
DocumentsTarget
A target specified by a set of documents names.
Properties:
Name | Type | Description |
---|---|---|
documents |
Array.<string> |
The names of the documents to retrieve. In the format:
|
- Source:
- See:
DocumentTransform
A transformation of a document.
Properties:
Name | Type | Description |
---|---|---|
document |
string |
The name of the document to transform. |
fieldTransforms |
Array.<Object> |
The list of transformations to apply to the fields of the document, in order. This must not be empty. This object should have the same structure as FieldTransform |
- Source:
- See:
ExistenceFilter
A digest of all the documents that match a given target.
Properties:
Name | Type | Description |
---|---|---|
targetId |
number |
The target ID to which this filter applies. |
count |
number |
The total count of documents that match target_id. If different from the count of documents in the client that match, the client must manually determine which documents no longer match the target. |
- Source:
- See:
FieldFilter
A filter on a specific field.
Properties:
Name | Type | Description |
---|---|---|
field |
Object |
The field to filter by. This object should have the same structure as FieldReference |
op |
number |
The operator to filter by. The number should be among the values of Operator |
value |
Object |
The value to compare to. This object should have the same structure as Value |
- Source:
- See:
FieldReference
A reference to a field, such as max(messages.time) as max_time
.
Properties:
Name | Type | Description |
---|---|---|
fieldPath |
string |
- Source:
- See:
FieldTransform
A transformation of a field of the document.
Properties:
Name | Type | Description |
---|---|---|
fieldPath |
string |
The path of the field. See Document.fields for the field path syntax reference. |
setToServerValue |
number |
Sets the field to the given server value. The number should be among the values of ServerValue |
increment |
Object |
Adds the given value to the field's current value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If either of the given value or the current field value are doubles, both values will be interpreted as doubles. Double arithmetic and representation of double values follow IEEE 754 semantics. If there is positive/negative integer overflow, the field is resolved to the largest magnitude positive/negative integer. This object should have the same structure as Value |
maximum |
Object |
Sets the field to the maximum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the given value. If a maximum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the larger operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and zero input value is always the stored value. The maximum of any numeric value x and NaN is NaN. This object should have the same structure as Value |
minimum |
Object |
Sets the field to the minimum of its current value and the given value. This must be an integer or a double value. If the field is not an integer or double, or if the field does not yet exist, the transformation will set the field to the input value. If a minimum operation is applied where the field and the input value are of mixed types (that is - one is an integer and one is a double) the field takes on the type of the smaller operand. If the operands are equivalent (e.g. 3 and 3.0), the field does not change. 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and zero input value is always the stored value. The minimum of any numeric value x and NaN is NaN. This object should have the same structure as Value |
appendMissingElements |
Object |
Append the given elements in order if they are not already present in the current field value. If the field is not an array, or if the field does not yet exist, it is first set to the empty array. Equivalent numbers of different types (e.g. 3L and 3.0) are considered equal when checking if a value is missing. NaN is equal to NaN, and Null is equal to Null. If the input contains multiple equivalent values, only the first will be considered. The corresponding transform_result will be the null value. This object should have the same structure as ArrayValue |
removeAllFromArray |
Object |
Remove all of the given elements from the array in the field. If the field is not an array, or if the field does not yet exist, it is set to the empty array. Equivalent numbers of the different types (e.g. 3L and 3.0) are considered equal when deciding whether an element should be removed. NaN is equal to NaN, and Null is equal to Null. This will remove all equivalent values if there are duplicates. The corresponding transform_result will be the null value. This object should have the same structure as ArrayValue |
- Source:
- See:
Filter
A filter.
Properties:
Name | Type | Description |
---|---|---|
compositeFilter |
Object |
A composite filter. This object should have the same structure as CompositeFilter |
fieldFilter |
Object |
A filter on a document field. This object should have the same structure as FieldFilter |
unaryFilter |
Object |
A filter that takes exactly one argument. This object should have the same structure as UnaryFilter |
- Source:
- See:
GetDocumentRequest
The request for Firestore.GetDocument.
Properties:
Name | Type | Description |
---|---|---|
name |
string |
The resource name of the Document to get. In the format:
|
mask |
Object |
The fields to return. If not set, returns all fields. If the document has a field that is not present in this mask, that field will not be returned in the response. This object should have the same structure as DocumentMask |
transaction |
Buffer |
Reads the document in a transaction. |
readTime |
Object |
Reads the version of the document at the given time. This may not be older than 60 seconds. This object should have the same structure as Timestamp |
- Source:
- See:
ListCollectionIdsRequest
The request for Firestore.ListCollectionIds.
Properties:
Name | Type | Description |
---|---|---|
parent |
string |
The parent document. In the format:
|
pageSize |
number |
The maximum number of results to return. |
pageToken |
string |
A page token. Must be a value from ListCollectionIdsResponse. |
- Source:
- See:
ListCollectionIdsResponse
The response from Firestore.ListCollectionIds.
Properties:
Name | Type | Description |
---|---|---|
collectionIds |
Array.<string> |
The collection ids. |
nextPageToken |
string |
A page token that may be used to continue the list. |
- Source:
- See:
ListDocumentsRequest
The request for Firestore.ListDocuments.
Properties:
Name | Type | Description |
---|---|---|
parent |
string |
The parent resource name. In the format:
|
collectionId |
string |
The collection ID, relative to |
pageSize |
number |
The maximum number of documents to return. |
pageToken |
string |
The |
orderBy |
string |
The order to sort results by. For example: |
mask |
Object |
The fields to return. If not set, returns all fields. If a document has a field that is not present in this mask, that field will not be returned in the response. This object should have the same structure as DocumentMask |
transaction |
Buffer |
Reads documents in a transaction. |
readTime |
Object |
Reads documents as they were at the given time. This may not be older than 60 seconds. This object should have the same structure as Timestamp |
showMissing |
boolean |
If the list should show missing documents. A missing document is a document that does not exist but has sub-documents. These documents will be returned with a key but will not have fields, Document.create_time, or Document.update_time set. Requests with |
- Source:
- See:
ListDocumentsResponse
The response for Firestore.ListDocuments.
Properties:
Name | Type | Description |
---|---|---|
documents |
Array.<Object> |
The Documents found. This object should have the same structure as Document |
nextPageToken |
string |
The next page token. |
- Source:
- See:
ListenRequest
A request for Firestore.Listen
Properties:
Name | Type | Description |
---|---|---|
database |
string |
The database name. In the format:
|
addTarget |
Object |
A target to add to this stream. This object should have the same structure as Target |
removeTarget |
number |
The ID of a target to remove from this stream. |
labels |
Object.<string, string> |
Labels associated with this target change. |
- Source:
- See:
ListenResponse
The response for Firestore.Listen.
Properties:
Name | Type | Description |
---|---|---|
targetChange |
Object |
Targets have changed. This object should have the same structure as TargetChange |
documentChange |
Object |
A Document has changed. This object should have the same structure as DocumentChange |
documentDelete |
Object |
A Document has been deleted. This object should have the same structure as DocumentDelete |
documentRemove |
Object |
A Document has been removed from a target (because it is no longer relevant to that target). This object should have the same structure as DocumentRemove |
filter |
Object |
A filter to apply to the set of documents previously returned for the given target. Returned when documents may have been removed from the given target, but the exact documents are unknown. This object should have the same structure as ExistenceFilter |
- Source:
- See:
MapValue
A map value.
Properties:
Name | Type | Description |
---|---|---|
fields |
Object.<string, Object> |
The map's fields. The map keys represent field names. Field names matching the regular
expression |
- Source:
- See:
Order
An order on a field.
Properties:
Name | Type | Description |
---|---|---|
field |
Object |
The field to order by. This object should have the same structure as FieldReference |
direction |
number |
The direction to order by. Defaults to The number should be among the values of Direction |
- Source:
- See:
Precondition
A precondition on a document, used for conditional operations.
Properties:
Name | Type | Description |
---|---|---|
exists |
boolean |
When set to |
updateTime |
Object |
When set, the target document must exist and have been last updated at that time. This object should have the same structure as Timestamp |
- Source:
- See:
Projection
The projection of document's fields to return.
Properties:
Name | Type | Description |
---|---|---|
fields |
Array.<Object> |
The fields to return. If empty, all fields are returned. To only return the name
of the document, use This object should have the same structure as FieldReference |
- Source:
- See:
QueryTarget
A target specified by a query.
Properties:
Name | Type | Description |
---|---|---|
parent |
string |
The parent resource name. In the format:
|
structuredQuery |
Object |
A structured query. This object should have the same structure as StructuredQuery |
- Source:
- See:
ReadOnly
Options for a transaction that can only be used to read documents.
Properties:
Name | Type | Description |
---|---|---|
readTime |
Object |
Reads documents at the given time. This may not be older than 60 seconds. This object should have the same structure as Timestamp |
- Source:
- See:
ReadWrite
Options for a transaction that can be used to read and write documents.
Properties:
Name | Type | Description |
---|---|---|
retryTransaction |
Buffer |
An optional transaction to retry. |
- Source:
- See:
RollbackRequest
The request for Firestore.Rollback.
Properties:
Name | Type | Description |
---|---|---|
database |
string |
The database name. In the format:
|
transaction |
Buffer |
The transaction to roll back. |
- Source:
- See:
RunQueryRequest
The request for Firestore.RunQuery.
Properties:
Name | Type | Description |
---|---|---|
parent |
string |
The parent resource name. In the format:
|
structuredQuery |
Object |
A structured query. This object should have the same structure as StructuredQuery |
transaction |
Buffer |
Reads documents in a transaction. |
newTransaction |
Object |
Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream. This object should have the same structure as TransactionOptions |
readTime |
Object |
Reads documents as they were at the given time. This may not be older than 60 seconds. This object should have the same structure as Timestamp |
- Source:
- See:
RunQueryResponse
The response for Firestore.RunQuery.
Properties:
Name | Type | Description |
---|---|---|
transaction |
Buffer |
The transaction that was started as part of this request. Can only be set in the first response, and only if RunQueryRequest.new_transaction was set in the request. If set, no other fields will be set in this response. |
document |
Object |
A query result. Not set when reporting partial progress. This object should have the same structure as Document |
readTime |
Object |
The time at which the document was read. This may be monotonically
increasing; in this case, the previous documents in the result stream are
guaranteed not to have changed between their If the query returns no results, a response with This object should have the same structure as Timestamp |
skippedResults |
number |
The number of results that have been skipped due to an offset between the last response and the current response. |
- Source:
- See:
StructuredQuery
A Firestore query.
Properties:
Name | Type | Description |
---|---|---|
select |
Object |
The projection to return. This object should have the same structure as Projection |
from |
Array.<Object> |
The collections to query. This object should have the same structure as CollectionSelector |
where |
Object |
The filter to apply. This object should have the same structure as Filter |
orderBy |
Array.<Object> |
The order to apply to the query results. Firestore guarantees a stable ordering through the following rules:
Fields are appended with the same sort direction as the last order specified, or 'ASCENDING' if no order was specified. For example:
This object should have the same structure as Order |
startAt |
Object |
A starting point for the query results. This object should have the same structure as Cursor |
endAt |
Object |
A end point for the query results. This object should have the same structure as Cursor |
offset |
number |
The number of results to skip. Applies before limit, but after all other constraints. Must be >= 0 if specified. |
limit |
Object |
The maximum number of results to return. Applies after all other constraints. Must be >= 0 if specified. This object should have the same structure as Int32Value |
- Source:
- See:
Target
A specification of a set of documents to listen to.
Properties:
Name | Type | Description |
---|---|---|
query |
Object |
A target specified by a query. This object should have the same structure as QueryTarget |
documents |
Object |
A target specified by a set of document names. This object should have the same structure as DocumentsTarget |
resumeToken |
Buffer |
A resume token from a prior TargetChange for an identical target. Using a resume token with a different target is unsupported and may fail. |
readTime |
Object |
Start listening after a specific The client must know the state of matching documents at this time. This object should have the same structure as Timestamp |
targetId |
number |
The target ID that identifies the target on the stream. Must be a positive number and non-zero. |
once |
boolean |
If the target should be removed once it is current and consistent. |
- Source:
- See:
TargetChange
Targets being watched have changed.
Properties:
Name | Type | Description |
---|---|---|
targetChangeType |
number |
The type of change that occurred. The number should be among the values of TargetChangeType |
targetIds |
Array.<number> |
The target IDs of targets that have changed. If empty, the change applies to all targets. The order of the target IDs is not defined. |
cause |
Object |
The error that resulted in this change, if applicable. This object should have the same structure as Status |
resumeToken |
Buffer |
A token that can be used to resume the stream for the given Not set on every target change. |
readTime |
Object |
The consistent The stream is guaranteed to send a For a given stream, This object should have the same structure as Timestamp |
- Source:
- See:
TransactionOptions
Options for creating a new transaction.
Properties:
Name | Type | Description |
---|---|---|
readOnly |
Object |
The transaction can only be used for read operations. This object should have the same structure as ReadOnly |
readWrite |
Object |
The transaction can be used for both read and write operations. This object should have the same structure as ReadWrite |
- Source:
- See:
UnaryFilter
A filter with a single operand.
Properties:
Name | Type | Description |
---|---|---|
op |
number |
The unary operator to apply. The number should be among the values of Operator |
field |
Object |
The field to which to apply the operator. This object should have the same structure as FieldReference |
- Source:
- See:
UpdateDocumentRequest
The request for Firestore.UpdateDocument.
Properties:
Name | Type | Description |
---|---|---|
document |
Object |
The updated document. Creates the document if it does not already exist. This object should have the same structure as Document |
updateMask |
Object |
The fields to update. None of the field paths in the mask may contain a reserved name. If the document exists on the server and has fields not referenced in the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document, are deleted from the document on the server. This object should have the same structure as DocumentMask |
mask |
Object |
The fields to return. If not set, returns all fields. If the document has a field that is not present in this mask, that field will not be returned in the response. This object should have the same structure as DocumentMask |
currentDocument |
Object |
An optional precondition on the document. The request will fail if this is set and not met by the target document. This object should have the same structure as Precondition |
- Source:
- See:
Value
A message that can hold any of the supported value types.
Properties:
Name | Type | Description |
---|---|---|
nullValue |
number |
A null value. The number should be among the values of NullValue |
booleanValue |
boolean |
A boolean value. |
integerValue |
number |
An integer value. |
doubleValue |
number |
A double value. |
timestampValue |
Object |
A timestamp value. Precise only to microseconds. When stored, any additional precision is rounded down. This object should have the same structure as Timestamp |
stringValue |
string |
A string value. The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes of the UTF-8 representation are considered by queries. |
bytesValue |
Buffer |
A bytes value. Must not exceed 1 MiB - 89 bytes. Only the first 1,500 bytes are considered by queries. |
referenceValue |
string |
A reference to a document. For example:
|
geoPointValue |
Object |
A geo point value representing a point on the surface of Earth. This object should have the same structure as LatLng |
arrayValue |
Object |
An array value. Cannot directly contain another array value, though can contain an map which contains another array. This object should have the same structure as ArrayValue |
mapValue |
Object |
A map value. This object should have the same structure as MapValue |
- Source:
- See:
Write
A write on a document.
Properties:
Name | Type | Description |
---|---|---|
update |
Object |
A document to write. This object should have the same structure as Document |
delete |
string |
A document name to delete. In the format:
|
transform |
Object |
Applies a transformation to a document.
At most one This object should have the same structure as DocumentTransform |
updateMask |
Object |
The fields to update in this write. This field can be set only when the operation is This object should have the same structure as DocumentMask |
currentDocument |
Object |
An optional precondition on the document. The write will fail if this is set and not met by the target document. This object should have the same structure as Precondition |
- Source:
- See:
WriteRequest
The request for Firestore.Write.
The first request creates a stream, or resumes an existing one from a token.
When creating a new stream, the server replies with a response containing only an ID and a token, to use in the next request.
When resuming a stream, the server first streams any responses later than the given token, then a response containing only an up-to-date token, to use in the next request.
Properties:
Name | Type | Description |
---|---|---|
database |
string |
The database name. In the format:
|
streamId |
string |
The ID of the write stream to resume. This may only be set in the first message. When left empty, a new write stream will be created. |
writes |
Array.<Object> |
The writes to apply. Always executed atomically and in order. This must be empty on the first request. This may be empty on the last request. This must not be empty on all other requests. This object should have the same structure as Write |
streamToken |
Buffer |
A stream token that was previously sent by the server. The client should set this field to the token from the most recent WriteResponse it has received. This acknowledges that the client has received responses up to this token. After sending this token, earlier tokens may not be used anymore. The server may close the stream if there are too many unacknowledged responses. Leave this field unset when creating a new stream. To resume a stream at
a specific point, set this field and the Leave this field unset when creating a new stream. |
labels |
Object.<string, string> |
Labels associated with this write request. |
- Source:
- See:
WriteResponse
The response for Firestore.Write.
Properties:
Name | Type | Description |
---|---|---|
streamId |
string |
The ID of the stream. Only set on the first message, when a new stream was created. |
streamToken |
Buffer |
A token that represents the position of this response in the stream. This can be used by a client to resume the stream at this point. This field is always set. |
writeResults |
Array.<Object> |
The result of applying the writes. This i-th write result corresponds to the i-th write in the request. This object should have the same structure as WriteResult |
commitTime |
Object |
The time at which the commit occurred. This object should have the same structure as Timestamp |
- Source:
- See:
WriteResult
The result of applying a write.
Properties:
Name | Type | Description |
---|---|---|
updateTime |
Object |
The last update time of the document after applying the write. Not set
after a If the write did not actually change the document, this will be the previous update_time. This object should have the same structure as Timestamp |
transformResults |
Array.<Object> |
The results of applying each DocumentTransform.FieldTransform, in the same order. This object should have the same structure as Value |