Class: Google::Cloud::Datastore::V1::EntityResult
- Inherits:
-
Object
- Object
- Google::Cloud::Datastore::V1::EntityResult
- 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
-
#cursor ⇒ ::String
A cursor that points to the position after the result entity.
-
#entity ⇒ ::Google::Cloud::Datastore::V1::Entity
The resulting entity.
-
#update_time ⇒ ::Google::Protobuf::Timestamp
The time at which the entity was last changed.
-
#version ⇒ ::Integer
The version of the entity, a strictly positive number that monotonically increases with changes to the entity.
Instance Attribute Details
#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.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'proto_docs/google/datastore/v1/query.rb', line 49 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.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'proto_docs/google/datastore/v1/query.rb', line 49 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.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'proto_docs/google/datastore/v1/query.rb', line 49 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.
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'proto_docs/google/datastore/v1/query.rb', line 49 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 |