aws-record 1.0.0 → 1.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 +24 -1
- data/lib/aws-record/record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e48846d201d3875b4a5aff0d1238f88c20b3d67
|
4
|
+
data.tar.gz: e25d28b815549f62dcdbff6d27c057e524395c86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 893e0a90b1971f5324c20cf3a70ddfa28cc07f35efa46cad7e3eef1d81cb70861bf36752d34fdb8fa438386f12018b044f5190611735a077f4662167991fe5aa
|
7
|
+
data.tar.gz: 55c4af09bd3c112113197cba16826a58a95d246a274e43f5f8abd9c280a31588709c25cc8c7cfd5d108a65262e0a9ea8f9ed93f0471f0644a1caf11a688a059c
|
@@ -23,6 +23,18 @@ module Aws
|
|
23
23
|
@client = client
|
24
24
|
end
|
25
25
|
|
26
|
+
# Provides an enumeration of the results of a query or scan operation on
|
27
|
+
# your table, automatically converted into item classes.
|
28
|
+
#
|
29
|
+
# WARNING: This will enumerate over your entire partition in the case of
|
30
|
+
# query, and over your entire table in the case of scan, save for key and
|
31
|
+
# filter expressions used. This means that enumerable operations that
|
32
|
+
# iterate over the full result set could make many network calls, or use a
|
33
|
+
# lot of memory to build response objects. Use with caution.
|
34
|
+
#
|
35
|
+
# @return [Enumerable<Aws::Record>] an enumeration over the results of
|
36
|
+
# your query or scan request. These results are automatically converted
|
37
|
+
# into items on your behalf.
|
26
38
|
def each(&block)
|
27
39
|
return enum_for(:each) unless block_given?
|
28
40
|
items.each_page do |page|
|
@@ -33,8 +45,19 @@ module Aws
|
|
33
45
|
end
|
34
46
|
end
|
35
47
|
|
48
|
+
# Checks if the query/scan result is completely blank.
|
49
|
+
#
|
50
|
+
# WARNING: This can and will query your entire partition, or scan your
|
51
|
+
# entire table, if no results are found. Especially if your table is
|
52
|
+
# large, use this with extreme caution.
|
53
|
+
#
|
54
|
+
# @return [Boolean] true if the query/scan result is empty, false
|
55
|
+
# otherwise.
|
36
56
|
def empty?
|
37
|
-
items.
|
57
|
+
items.each_page do |page|
|
58
|
+
return false if !page.items.empty?
|
59
|
+
end
|
60
|
+
true
|
38
61
|
end
|
39
62
|
|
40
63
|
private
|
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: 1.0.
|
4
|
+
version: 1.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: 2016-08-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-resources
|