Reference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::EntityResult.
The result of fetching an entity from Datastore.
Inherits
Object
Extended By
Google::Protobuf::MessageExts::ClassMethods
Includes
Google::Protobuf::MessageExts
Methods
#create_time
defcreate_time()->::Google::Protobuf::Timestamp
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.
value (::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.
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.
#cursor
defcursor()->::String
Returns
(::String) — A cursor that points to the position after the result entity.
Set only when the EntityResult is part of a QueryResultBatch message.
#cursor=
defcursor=(value)->::String
Parameter
value (::String) — 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.
(::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.
value (::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.
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.
#version
defversion()->::Integer
Returns
(::Integer) — The version of the entity, a strictly positive number that monotonically
increases with changes to the entity.
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.
#version=
defversion=(value)->::Integer
Parameter
value (::Integer) — The version of the entity, a strictly positive number that monotonically
increases with changes to the entity.
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.
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Firestore in Datastore mode V1 API - Class Google::Cloud::Datastore::V1::EntityResult (v1.4.1)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.1 (latest)](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult)\n- [1.4.0](/ruby/docs/reference/google-cloud-datastore-v1/1.4.0/Google-Cloud-Datastore-V1-EntityResult)\n- [1.3.1](/ruby/docs/reference/google-cloud-datastore-v1/1.3.1/Google-Cloud-Datastore-V1-EntityResult)\n- [1.2.0](/ruby/docs/reference/google-cloud-datastore-v1/1.2.0/Google-Cloud-Datastore-V1-EntityResult)\n- [1.1.0](/ruby/docs/reference/google-cloud-datastore-v1/1.1.0/Google-Cloud-Datastore-V1-EntityResult)\n- [1.0.1](/ruby/docs/reference/google-cloud-datastore-v1/1.0.1/Google-Cloud-Datastore-V1-EntityResult)\n- [0.19.0](/ruby/docs/reference/google-cloud-datastore-v1/0.19.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.18.0](/ruby/docs/reference/google-cloud-datastore-v1/0.18.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.17.0](/ruby/docs/reference/google-cloud-datastore-v1/0.17.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.16.3](/ruby/docs/reference/google-cloud-datastore-v1/0.16.3/Google-Cloud-Datastore-V1-EntityResult)\n- [0.15.0](/ruby/docs/reference/google-cloud-datastore-v1/0.15.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.14.0](/ruby/docs/reference/google-cloud-datastore-v1/0.14.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.13.1](/ruby/docs/reference/google-cloud-datastore-v1/0.13.1/Google-Cloud-Datastore-V1-EntityResult)\n- [0.12.0](/ruby/docs/reference/google-cloud-datastore-v1/0.12.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.11.1](/ruby/docs/reference/google-cloud-datastore-v1/0.11.1/Google-Cloud-Datastore-V1-EntityResult)\n- [0.10.0](/ruby/docs/reference/google-cloud-datastore-v1/0.10.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.9.0](/ruby/docs/reference/google-cloud-datastore-v1/0.9.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.8.0](/ruby/docs/reference/google-cloud-datastore-v1/0.8.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.7.0](/ruby/docs/reference/google-cloud-datastore-v1/0.7.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.6.0](/ruby/docs/reference/google-cloud-datastore-v1/0.6.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.5.0](/ruby/docs/reference/google-cloud-datastore-v1/0.5.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.4.0](/ruby/docs/reference/google-cloud-datastore-v1/0.4.0/Google-Cloud-Datastore-V1-EntityResult)\n- [0.3.5](/ruby/docs/reference/google-cloud-datastore-v1/0.3.5/Google-Cloud-Datastore-V1-EntityResult) \nReference documentation and code samples for the Firestore in Datastore mode V1 API class Google::Cloud::Datastore::V1::EntityResult.\n\nThe result of fetching an entity from Datastore. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #create_time\n\n def create_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- The time at which the entity was created. This field is set for [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results. If this entity is missing, this field will not be set.\n\n### #create_time=\n\n def create_time=(value) -\u003e ::Google::Protobuf::Timestamp\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- The time at which the entity was created. This field is set for [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results. If this entity is missing, this field will not be set. \n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- The time at which the entity was created. This field is set for [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results. If this entity is missing, this field will not be set.\n\n### #cursor\n\n def cursor() -\u003e ::String\n\n**Returns**\n\n- (::String) --- A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.\n\n### #cursor=\n\n def cursor=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message. \n**Returns**\n\n- (::String) --- A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message.\n\n### #entity\n\n def entity() -\u003e ::Google::Cloud::Datastore::V1::Entity\n\n**Returns**\n\n- ([::Google::Cloud::Datastore::V1::Entity](./Google-Cloud-Datastore-V1-Entity)) --- The resulting entity.\n\n### #entity=\n\n def entity=(value) -\u003e ::Google::Cloud::Datastore::V1::Entity\n\n**Parameter**\n\n- **value** ([::Google::Cloud::Datastore::V1::Entity](./Google-Cloud-Datastore-V1-Entity)) --- The resulting entity. \n**Returns**\n\n- ([::Google::Cloud::Datastore::V1::Entity](./Google-Cloud-Datastore-V1-Entity)) --- The resulting entity.\n\n### #update_time\n\n def update_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- The time at which the entity was last changed. This field is set for [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results. If this entity is missing, this field will not be set.\n\n### #update_time=\n\n def update_time=(value) -\u003e ::Google::Protobuf::Timestamp\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- The time at which the entity was last changed. This field is set for [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results. If this entity is missing, this field will not be set. \n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- The time at which the entity was last changed. This field is set for [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results. If this entity is missing, this field will not be set.\n\n### #version\n\n def version() -\u003e ::Integer\n\n**Returns**\n\n- (::Integer) --- The version of the entity, a strictly positive number that monotonically increases with changes to the entity.\n\n This field is set for\n [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results.\n\n For [missing](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-LookupResponse#Google__Cloud__Datastore__V1__LookupResponse_missing_instance_ \"Google::Cloud::Datastore::V1::LookupResponse#missing (method)\") entities in\n `LookupResponse`, this is the version of the snapshot that was used to look\n up the entity, and it is always set except for eventually consistent reads.\n\n### #version=\n\n def version=(value) -\u003e ::Integer\n\n**Parameter**\n\n- **value** (::Integer) --- The version of the entity, a strictly positive number that monotonically increases with changes to the entity.\n\n\n This field is set for\n [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results.\n\n For [missing](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-LookupResponse#Google__Cloud__Datastore__V1__LookupResponse_missing_instance_ \"Google::Cloud::Datastore::V1::LookupResponse#missing (method)\") entities in\n `LookupResponse`, this is the version of the snapshot that was used to look\nup the entity, and it is always set except for eventually consistent reads. \n**Returns**\n\n- (::Integer) --- The version of the entity, a strictly positive number that monotonically increases with changes to the entity.\n\n This field is set for\n [`FULL`](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-EntityResult-ResultType#Google__Cloud__Datastore__V1__EntityResult__ResultType__FULL \"Google::Cloud::Datastore::V1::EntityResult::ResultType::FULL (constant)\") entity results.\n\n For [missing](/ruby/docs/reference/google-cloud-datastore-v1/latest/Google-Cloud-Datastore-V1-LookupResponse#Google__Cloud__Datastore__V1__LookupResponse_missing_instance_ \"Google::Cloud::Datastore::V1::LookupResponse#missing (method)\") entities in\n `LookupResponse`, this is the version of the snapshot that was used to look\n up the entity, and it is always set except for eventually consistent reads."]]