aws-record 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-record/record/item_collection.rb +27 -0
- data/lib/aws-record/record/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7800be1064f00422e1512670962d2af0b0579aa
|
4
|
+
data.tar.gz: 3ca62f412897b8e315affc5b50244be4e770a64b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
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.
|
80
|
+
rubygems_version: 2.6.13
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: AWS Record library for Amazon DynamoDB
|