Reference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::Mutation.
A mutation to apply to an entity.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#base_version
def base_version() -> ::Integer
- (::Integer) — The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.
#base_version=
def base_version=(value) -> ::Integer
- value (::Integer) — The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.
- (::Integer) — The version of the entity that this mutation is being applied to. If this does not match the current version on the server, the mutation conflicts.
#delete
def delete() -> ::Google::Cloud::Datastore::V1::Key
- (::Google::Cloud::Datastore::V1::Key) — The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only.
#delete=
def delete=(value) -> ::Google::Cloud::Datastore::V1::Key
- value (::Google::Cloud::Datastore::V1::Key) — The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only.
- (::Google::Cloud::Datastore::V1::Key) — The key of the entity to delete. The entity may or may not already exist. Must have a complete key path and must not be reserved/read-only.
#insert
def insert() -> ::Google::Cloud::Datastore::V1::Entity
- (::Google::Cloud::Datastore::V1::Entity) — The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete.
#insert=
def insert=(value) -> ::Google::Cloud::Datastore::V1::Entity
- value (::Google::Cloud::Datastore::V1::Entity) — The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete.
- (::Google::Cloud::Datastore::V1::Entity) — The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete.
#property_mask
def property_mask() -> ::Google::Cloud::Datastore::V1::PropertyMask
-
(::Google::Cloud::Datastore::V1::PropertyMask) — The properties to write in this mutation.
None of the properties in the mask may have a reserved name, except for
__key__
. This field is ignored fordelete
.If the entity already exists, only properties referenced in the mask are updated, others are left untouched. Properties referenced in the mask but not in the entity are deleted.
#property_mask=
def property_mask=(value) -> ::Google::Cloud::Datastore::V1::PropertyMask
-
value (::Google::Cloud::Datastore::V1::PropertyMask) — The properties to write in this mutation.
None of the properties in the mask may have a reserved name, except for
__key__
. This field is ignored fordelete
.If the entity already exists, only properties referenced in the mask are updated, others are left untouched. Properties referenced in the mask but not in the entity are deleted.
-
(::Google::Cloud::Datastore::V1::PropertyMask) — The properties to write in this mutation.
None of the properties in the mask may have a reserved name, except for
__key__
. This field is ignored fordelete
.If the entity already exists, only properties referenced in the mask are updated, others are left untouched. Properties referenced in the mask but not in the entity are deleted.
#update
def update() -> ::Google::Cloud::Datastore::V1::Entity
- (::Google::Cloud::Datastore::V1::Entity) — The entity to update. The entity must already exist. Must have a complete key path.
#update=
def update=(value) -> ::Google::Cloud::Datastore::V1::Entity
- value (::Google::Cloud::Datastore::V1::Entity) — The entity to update. The entity must already exist. Must have a complete key path.
- (::Google::Cloud::Datastore::V1::Entity) — The entity to update. The entity must already exist. Must have a complete key path.
#update_time
def update_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts.
#update_time=
def update_time=(value) -> ::Google::Protobuf::Timestamp
- value (::Google::Protobuf::Timestamp) — The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts.
- (::Google::Protobuf::Timestamp) — The update time of the entity that this mutation is being applied to. If this does not match the current update time on the server, the mutation conflicts.
#upsert
def upsert() -> ::Google::Cloud::Datastore::V1::Entity
- (::Google::Cloud::Datastore::V1::Entity) — The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete.
#upsert=
def upsert=(value) -> ::Google::Cloud::Datastore::V1::Entity
- value (::Google::Cloud::Datastore::V1::Entity) — The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete.
- (::Google::Cloud::Datastore::V1::Entity) — The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete.