Class: Google::Datastore::V1::EntityResult

Inherits:
Object
  • Object
show all
Defined in:
lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb

Overview

The result of fetching an entity from Datastore.

Defined Under Namespace

Modules: ResultType

Instance Attribute Summary collapse

Instance Attribute Details

#cursorString

Returns A cursor that points to the position after the result entity. Set only when the +EntityResult+ is part of a +QueryResultBatch+ message.

Returns:

  • (String)

    A cursor that points to the position after the result entity. Set only when the +EntityResult+ is part of a +QueryResultBatch+ message.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 37

class EntityResult
  # Specifies what data the 'entity' field contains.
  # A +ResultType+ is either implied (for example, in +LookupResponse.missing+
  # from +datastore.proto+, it is always +KEY_ONLY+) or specified by context
  # (for example, in message +QueryResultBatch+, field +entity_result_type+
  # specifies a +ResultType+ for all the values in field +entity_results+).
  module ResultType
    # Unspecified. This value is never used.
    RESULT_TYPE_UNSPECIFIED = 0

    # The key and properties.
    FULL = 1

    # A projected subset of properties. The entity may have no key.
    PROJECTION = 2

    # Only the key.
    KEY_ONLY = 3
  end
end

#entityGoogle::Datastore::V1::Entity

Returns The resulting entity.

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 37

class EntityResult
  # Specifies what data the 'entity' field contains.
  # A +ResultType+ is either implied (for example, in +LookupResponse.missing+
  # from +datastore.proto+, it is always +KEY_ONLY+) or specified by context
  # (for example, in message +QueryResultBatch+, field +entity_result_type+
  # specifies a +ResultType+ for all the values in field +entity_results+).
  module ResultType
    # Unspecified. This value is never used.
    RESULT_TYPE_UNSPECIFIED = 0

    # The key and properties.
    FULL = 1

    # A projected subset of properties. The entity may have no key.
    PROJECTION = 2

    # Only the key.
    KEY_ONLY = 3
  end
end

#versionInteger

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

Returns:

  • (Integer)

    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.



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/google/cloud/datastore/v1/doc/google/datastore/v1/query.rb', line 37

class EntityResult
  # Specifies what data the 'entity' field contains.
  # A +ResultType+ is either implied (for example, in +LookupResponse.missing+
  # from +datastore.proto+, it is always +KEY_ONLY+) or specified by context
  # (for example, in message +QueryResultBatch+, field +entity_result_type+
  # specifies a +ResultType+ for all the values in field +entity_results+).
  module ResultType
    # Unspecified. This value is never used.
    RESULT_TYPE_UNSPECIFIED = 0

    # The key and properties.
    FULL = 1

    # A projected subset of properties. The entity may have no key.
    PROJECTION = 2

    # Only the key.
    KEY_ONLY = 3
  end
end