Class: Gcloud::Datastore::Dataset::LookupResults
- Inherits:
-
Array
- Object
- Array
- Gcloud::Datastore::Dataset::LookupResults
- Defined in:
- lib/gcloud/datastore/dataset/lookup_results.rb
Overview
LookupResults is a special case Array with additional values. A LookupResults object is returned from Dataset#find_all and contains the entities as well as the Keys that were deferred from the results and the Entities that were missing in the dataset.
Please be cautious when treating the QueryResults as an Array. Many common Array methods will return a new Array instance.
Instance Attribute Summary collapse
-
#deferred ⇒ Object
Keys that were not looked up due to resource constraints.
-
#missing ⇒ Object
Entities not found, with only the key populated.
Instance Method Summary collapse
-
#initialize(arr = [], deferred = [], missing = []) ⇒ LookupResults
constructor
Create a new LookupResults with an array of values.
Constructor Details
#initialize(arr = [], deferred = [], missing = []) ⇒ LookupResults
Create a new LookupResults with an array of values.
57 58 59 60 61 |
# File 'lib/gcloud/datastore/dataset/lookup_results.rb', line 57 def initialize arr = [], deferred = [], missing = [] super arr @deferred = deferred @missing = missing end |
Instance Attribute Details
#deferred ⇒ Object
Keys that were not looked up due to resource constraints.
49 50 51 |
# File 'lib/gcloud/datastore/dataset/lookup_results.rb', line 49 def deferred @deferred end |
#missing ⇒ Object
Entities not found, with only the key populated.
53 54 55 |
# File 'lib/gcloud/datastore/dataset/lookup_results.rb', line 53 def missing @missing end |