Class: Dynamoid::AdapterPlugin::AwsSdkV3::Middleware::StartKey
- Inherits:
-
Object
- Object
- Dynamoid::AdapterPlugin::AwsSdkV3::Middleware::StartKey
- Defined in:
- lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/start_key.rb
Instance Method Summary collapse
- #call(request) ⇒ Object
-
#initialize(next_chain) ⇒ StartKey
constructor
A new instance of StartKey.
Constructor Details
#initialize(next_chain) ⇒ StartKey
Returns a new instance of StartKey.
9 10 11 |
# File 'lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/start_key.rb', line 9 def initialize(next_chain) @next_chain = next_chain end |
Instance Method Details
#call(request) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/dynamoid/adapter_plugin/aws_sdk_v3/middleware/start_key.rb', line 13 def call(request) response = @next_chain.call(request) if response.last_evaluated_key request[:exclusive_start_key] = response.last_evaluated_key else throw :stop_pagination end response end |