aws-record 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69e28c54f94c30b37425742c7b7d7602a1d9dac8
4
- data.tar.gz: f13f948ab1688148aefa94d719a8729912fee7ee
3
+ metadata.gz: a7800be1064f00422e1512670962d2af0b0579aa
4
+ data.tar.gz: 3ca62f412897b8e315affc5b50244be4e770a64b
5
5
  SHA512:
6
- metadata.gz: 4ebb86a64fe0bc4fff14a2fbb735d2f5823bec4b09f1f9102db1bbc1c8b6945049c90ab99b9e8c79445c759789b949ae3dccffa33248e1db910b31034aa687ca
7
- data.tar.gz: 1d053ecb6032d028c9ec182f3987c9b1dbb4b1f0389c4584400827a5433a260c8423c84e18e3264c1e8061d3320afe5c53f49cef6c73cf9602a5c3379c362db9
6
+ metadata.gz: 4d4889d7a3a5d7903eaf4c1d90b704e366f8768246641e264fbe8d7491bec45ebba2c0eccfdf1c3d6c1da5d320773f00ce2ef6ec9a9b8d89c56796ffa41c1d87
7
+ data.tar.gz: e1838d4e4dfda379da766e68de68618f9832520b05e62aa8dfb55eb3916d3861b35a1b2ae2f456d8e0f670ee9f5a109336a5e48ba1d488cbc1d79d11581c9c63
@@ -38,6 +38,7 @@ module Aws
38
38
  def each(&block)
39
39
  return enum_for(:each) unless block_given?
40
40
  items.each_page do |page|
41
+ @last_evaluated_key = page.last_evaluated_key
41
42
  items_array = _build_items_from_response(page.items, @model)
42
43
  items_array.each do |item|
43
44
  yield item
@@ -45,6 +46,32 @@ module Aws
45
46
  end
46
47
  end
47
48
 
49
+ # Provides the first "page" of responses from your query operation. This
50
+ # will only make a single client call, and will provide the items, if any
51
+ # exist, from that response. It will not attempt to follow up on
52
+ # pagination tokens, so this is not guaranteed to include all items that
53
+ # match your search.
54
+ #
55
+ # @return [Array<Aws::Record>] an array of the record items found in the
56
+ # first page of reponses from the query or scan call.
57
+ def page
58
+ search_response = items
59
+ @last_evaluated_key = search_response.last_evaluated_key
60
+ _build_items_from_response(search_response.items, @model)
61
+ end
62
+
63
+ # Provides the pagination key most recently used by the underlying client.
64
+ # This can be useful in the case where you're exposing pagination to an
65
+ # outside caller, and want to be able to "resume" your scan in a new call
66
+ # without starting over.
67
+ #
68
+ # @return [Hash] a hash representing an attribute key/value pair, suitable
69
+ # for use as the +exclusive_start_key+ in another query or scan
70
+ # operation. If there are no more pages in the result, will be nil.
71
+ def last_evaluated_key
72
+ @last_evaluated_key
73
+ end
74
+
48
75
  # Checks if the query/scan result is completely blank.
49
76
  #
50
77
  # WARNING: This can and will query your entire partition, or scan your
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Aws
15
15
  module Record
16
- VERSION = '2.0.0'
16
+ VERSION = '2.0.1'
17
17
  end
18
18
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-29 00:00:00.000000000 Z
11
+ date: 2017-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.5.1
80
+ rubygems_version: 2.6.13
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: AWS Record library for Amazon DynamoDB