aws-record 1.0.0 → 1.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: 19a2572d93b6bb752c7efcd55c59e401e688073a
4
- data.tar.gz: 271f40175f3b9e537a978229f11eeb56f0e6e09b
3
+ metadata.gz: 7e48846d201d3875b4a5aff0d1238f88c20b3d67
4
+ data.tar.gz: e25d28b815549f62dcdbff6d27c057e524395c86
5
5
  SHA512:
6
- metadata.gz: 067f68b8b2e90f19be14918f6f053fab1eca3255ad445bfa0c2f852f9b6fe5b32b0f89b8eb599c2d5f9af7e787070f0b3100478dcadc340a65a613f4c6e28df6
7
- data.tar.gz: 80f00b93c9cd04f5fa7724b7c2dc6a7f0593ba3279178502c2b9b9ee37ae087c2a84d24e986b7f42709f4c1335eb6b690ba3319b757c6a8f21b3872368542498
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.empty?
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
@@ -13,6 +13,6 @@
13
13
 
14
14
  module Aws
15
15
  module Record
16
- VERSION = '1.0.0'
16
+ VERSION = '1.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: 1.0.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-15 00:00:00.000000000 Z
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