Class: Google::Cloud::Datastore::V1::Mutation

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/datastore/v1/datastore.rb

Overview

A mutation to apply to an entity.

Instance Attribute Summary collapse

Instance Attribute Details

#base_version::Integer

Returns 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.

Returns:

  • (::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.



442
443
444
445
# File 'proto_docs/google/datastore/v1/datastore.rb', line 442

class Mutation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#delete::Google::Cloud::Datastore::V1::Key

Returns 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.

Returns:

  • (::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.



442
443
444
445
# File 'proto_docs/google/datastore/v1/datastore.rb', line 442

class Mutation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#insert::Google::Cloud::Datastore::V1::Entity

Returns The entity to insert. The entity must not already exist. The entity key's final path element may be incomplete.

Returns:



442
443
444
445
# File 'proto_docs/google/datastore/v1/datastore.rb', line 442

class Mutation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#property_mask::Google::Cloud::Datastore::V1::PropertyMask

Returns 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 for delete.

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.

Returns:

  • (::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 for delete.

    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.



442
443
444
445
# File 'proto_docs/google/datastore/v1/datastore.rb', line 442

class Mutation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#update::Google::Cloud::Datastore::V1::Entity

Returns The entity to update. The entity must already exist. Must have a complete key path.

Returns:



442
443
444
445
# File 'proto_docs/google/datastore/v1/datastore.rb', line 442

class Mutation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#update_time::Google::Protobuf::Timestamp

Returns 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.

Returns:

  • (::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.



442
443
444
445
# File 'proto_docs/google/datastore/v1/datastore.rb', line 442

class Mutation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end

#upsert::Google::Cloud::Datastore::V1::Entity

Returns The entity to upsert. The entity may or may not already exist. The entity key's final path element may be incomplete.

Returns:



442
443
444
445
# File 'proto_docs/google/datastore/v1/datastore.rb', line 442

class Mutation
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods
end