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

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/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

#create_time::Google::Protobuf::Timestamp

Returns The time at which the entity was created. This field is set for FULL entity results. If this entity is missing, this field will not be set.

Returns:

  • (::Google::Protobuf::Timestamp)

    The time at which the entity was created. This field is set for FULL entity results. If this entity is missing, this field will not be set.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'proto_docs/google/datastore/v1/query.rb', line 55

class EntityResult
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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

#cursor::String

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.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'proto_docs/google/datastore/v1/query.rb', line 55

class EntityResult
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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

#entity::Google::Cloud::Datastore::V1::Entity

Returns The resulting entity.

Returns:



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'proto_docs/google/datastore/v1/query.rb', line 55

class EntityResult
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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

#update_time::Google::Protobuf::Timestamp

Returns The time at which the entity was last changed. This field is set for FULL entity results. If this entity is missing, this field will not be set.

Returns:

  • (::Google::Protobuf::Timestamp)

    The time at which the entity was last changed. This field is set for FULL entity results. If this entity is missing, this field will not be set.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'proto_docs/google/datastore/v1/query.rb', line 55

class EntityResult
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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

#version::Integer

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.



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'proto_docs/google/datastore/v1/query.rb', line 55

class EntityResult
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # 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