Class: AppEngine::Datastore::KeyRange
- Inherits:
-
Object
- Object
- AppEngine::Datastore::KeyRange
- Includes:
- Enumerable
- Defined in:
- lib/appengine-apis/datastore_types.rb
Overview
Represents a range of unique datastore identifiers from start.id to end.id inclusive. The Keys returned by an instance of this class have been consumed in the datastore’s id-space and are guaranteed never to be reused.
This class can be used to construct Entity Entities with Keys that have specific id values without fear of the datastore creating new records with those same ids at a later date. This can be helpful as part of a data migration or large bulk upload where you may need to preserve existing ids and relationships between entities.
Instance Method Summary collapse
Instance Method Details
#each ⇒ Object
377 378 379 380 381 |
# File 'lib/appengine-apis/datastore_types.rb', line 377 def each iterator.each do |key| yield key end end |