Class: Rom::Dynamo::GlobalIndexDataset
- Defined in:
- lib/rom/dynamo/dataset.rb
Overview
Dataset queried via a Global Secondary Index Paginate through keys from Global Index and call BatchGetItem for keys from each page
Constant Summary
Constants inherited from Dataset
Instance Method Summary collapse
Methods inherited from Dataset
#batch_restrict, #delete, #each, #index_restrict, #insert, #limit, #offset, #restrict, #reversed, #update
Instance Method Details
#each_page(&block) ⇒ Object
175 176 177 178 179 180 181 182 183 184 |
# File 'lib/rom/dynamo/dataset.rb', line 175 def each_page(&block) return enum_for(:each_page) if block.nil? if @query[:limit] block.call(populated_results(start_query)) else start_query(limit: 100).each_page do |p| block.call(populated_results(p)) end end end |