Reference documentation and code samples for the Cloud Firestore V1 API class Google::Cloud::Firestore::V1::Write.
A write on a document.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#current_document
def current_document() -> ::Google::Cloud::Firestore::V1::Precondition
-
(::Google::Cloud::Firestore::V1::Precondition) — An optional precondition on the document.
The write will fail if this is set and not met by the target document.
#current_document=
def current_document=(value) -> ::Google::Cloud::Firestore::V1::Precondition
-
value (::Google::Cloud::Firestore::V1::Precondition) — An optional precondition on the document.
The write will fail if this is set and not met by the target document.
-
(::Google::Cloud::Firestore::V1::Precondition) — An optional precondition on the document.
The write will fail if this is set and not met by the target document.
#delete
def delete() -> ::String
-
(::String) — A document name to delete. In the format:
projects/{project_id}/databases/{database_id}/documents/{document_path}
.
#delete=
def delete=(value) -> ::String
-
value (::String) — A document name to delete. In the format:
projects/{project_id}/databases/{database_id}/documents/{document_path}
.
-
(::String) — A document name to delete. In the format:
projects/{project_id}/databases/{database_id}/documents/{document_path}
.
#transform
def transform() -> ::Google::Cloud::Firestore::V1::DocumentTransform
- (::Google::Cloud::Firestore::V1::DocumentTransform) — Applies a transformation to a document.
#transform=
def transform=(value) -> ::Google::Cloud::Firestore::V1::DocumentTransform
- value (::Google::Cloud::Firestore::V1::DocumentTransform) — Applies a transformation to a document.
- (::Google::Cloud::Firestore::V1::DocumentTransform) — Applies a transformation to a document.
#update
def update() -> ::Google::Cloud::Firestore::V1::Document
- (::Google::Cloud::Firestore::V1::Document) — A document to write.
#update=
def update=(value) -> ::Google::Cloud::Firestore::V1::Document
- value (::Google::Cloud::Firestore::V1::Document) — A document to write.
- (::Google::Cloud::Firestore::V1::Document) — A document to write.
#update_mask
def update_mask() -> ::Google::Cloud::Firestore::V1::DocumentMask
-
(::Google::Cloud::Firestore::V1::DocumentMask) — The fields to update in this write.
This field can be set only when the operation is
update
. If the mask is not set for anupdate
and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by 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. The field paths in this mask must not contain a reserved field name.
#update_mask=
def update_mask=(value) -> ::Google::Cloud::Firestore::V1::DocumentMask
-
value (::Google::Cloud::Firestore::V1::DocumentMask) — The fields to update in this write.
This field can be set only when the operation is
update
. If the mask is not set for anupdate
and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by 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. The field paths in this mask must not contain a reserved field name.
-
(::Google::Cloud::Firestore::V1::DocumentMask) — The fields to update in this write.
This field can be set only when the operation is
update
. If the mask is not set for anupdate
and the document exists, any existing data will be overwritten. If the mask is set and the document on the server has fields not covered by 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. The field paths in this mask must not contain a reserved field name.
#update_transforms
def update_transforms() -> ::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>
-
(::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>) — The transforms to perform after update.
This field can be set only when the operation is
update
. If present, this write is equivalent to performingupdate
andtransform
to the same document atomically and in order.
#update_transforms=
def update_transforms=(value) -> ::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>
-
value (::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>) — The transforms to perform after update.
This field can be set only when the operation is
update
. If present, this write is equivalent to performingupdate
andtransform
to the same document atomically and in order.
-
(::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>) — The transforms to perform after update.
This field can be set only when the operation is
update
. If present, this write is equivalent to performingupdate
andtransform
to the same document atomically and in order.