class Google::Apis::DatastoreV1::EntityResult

The result of fetching an entity from Datastore.

Attributes

cursor[RW]

A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message. Corresponds to the JSON property `cursor` NOTE: Values are automatically base64 encoded/decoded in the client library. @return [String]

entity[RW]

A Datastore data object. An entity is limited to 1 megabyte when stored. That roughly corresponds to a limit of 1 megabyte for the serialized form of this message. Corresponds to the JSON property `entity` @return [Google::Apis::DatastoreV1::Entity]

version[RW]

The version of the entity, a strictly positive number that monotonically increases with changes to the entity. This field is set for `FULL` entity results. For missing entities in `LookupResponse`, this is the version of the snapshot that was used to look up the entity, and it is always set except for eventually consistent reads. Corresponds to the JSON property `version` @return [Fixnum]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/datastore_v1/classes.rb, line 292
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/datastore_v1/classes.rb, line 297
def update!(**args)
  @cursor = args[:cursor] if args.key?(:cursor)
  @entity = args[:entity] if args.key?(:entity)
  @version = args[:version] if args.key?(:version)
end