ocean-dynamo 0.6.4 → 0.6.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f5dffe6dc00e94b77dec7aff11382bc0f512d54
4
- data.tar.gz: 18f6e9969b2611b910b161d5725c11b35b20541e
3
+ metadata.gz: 586ff6c721434d0dc2825584bbdda16ab3c581ca
4
+ data.tar.gz: 1e5393a205a663c4e10844c8451a9b3a560e099f
5
5
  SHA512:
6
- metadata.gz: 97b663d694875c923082fdd8034c531d60b9dbb1208f4de6104bf9b54bbb153149858e03593f86be65f390fb86f82caf51a7329a91af82a5ed13400fede3b3f4
7
- data.tar.gz: caa5a6da3f41e9bbd81c824303ebe3fb1ef4f9eeb2c9a447e85b646061661bea3c1eee8e56d105962d89489f3885ab144ebe3d1cc5ed0f3842037385dd8db13d
6
+ metadata.gz: 66dc1832eba9a0d29745fd7cee6371f50df1d54919cc51a790a3d709a4a0a7827c46ee0e47927210497747a28522d7d093c82956a9209e767969b522733b70a0
7
+ data.tar.gz: 56d479377f699c6e7e435642828393e06b9be039b5ca1704543f4e752eda882918f4367856bbcefe33bf7c700a765053ed187bc7ce06b212026b2871d835c5d5
@@ -43,8 +43,14 @@ module OceanDynamo
43
43
  def all(consistent: false, **options)
44
44
  _late_connect?
45
45
  result = []
46
- dynamo_items.select(options) do |item_data|
47
- result << new._setup_from_dynamo(item_data, consistent: consistent)
46
+ if consistent
47
+ dynamo_items.each(options) do |item|
48
+ result << new._setup_from_dynamo(item, consistent: consistent)
49
+ end
50
+ else
51
+ dynamo_items.select(options) do |item_data|
52
+ result << new._setup_from_dynamo(item_data)
53
+ end
48
54
  end
49
55
  result
50
56
  end
@@ -58,8 +64,14 @@ module OceanDynamo
58
64
  # thereby greatly reducing memory consumption.
59
65
  #
60
66
  def find_each(limit: nil, batch_size: 1000, consistent: false)
61
- dynamo_items.select(limit: limit, batch_size: batch_size) do |item_data|
62
- yield new._setup_from_dynamo(item_data, consistent: consistent)
67
+ if consistent
68
+ dynamo_items.each(limit: limit, batch_size: batch_size) do |item|
69
+ yield new._setup_from_dynamo(item, consistent: consistent)
70
+ end
71
+ else
72
+ dynamo_items.select(limit: limit, batch_size: batch_size) do |item_data|
73
+ yield new._setup_from_dynamo(item_data)
74
+ end
63
75
  end
64
76
  true
65
77
  end
@@ -1,3 +1,3 @@
1
1
  module OceanDynamo
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocean-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Bengtson