toy-dynamo 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toy/dynamo/table.rb +1 -1
- data/lib/toy/dynamo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfa5e73170ca1ff34c47080c36267bd36f15c016
|
4
|
+
data.tar.gz: 68c4324e8a6442acb79445131701949f63cdfc2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf6e61cb9b782550f98c8bba49064e56a94945a116bc6e9456a67873b370b23efb4c43a97f439d45654478e81a439d2972d9f0812832cf0671c7dc7ba23ea2e9
|
7
|
+
data.tar.gz: 910abb79b3fb9c6f182b971c5449d5e24cd806871fab05aac6c57e92eb18a579ee7be8cc838e1a0b5b37cfac799bf31ffba639cfff8713d24c579a1e09eec060
|
data/lib/toy/dynamo/table.rb
CHANGED
@@ -182,7 +182,6 @@ module Toy
|
|
182
182
|
raise ArgumentError, ":range key must be a Range if using the operator BETWEEN" if comparison_operator == "between" && !options[:range].values.first.is_a?(Range)
|
183
183
|
|
184
184
|
if range_key.has_key?(:index_name) # Local/Global Secondary Index
|
185
|
-
options[:select] = :projected unless options[:select].present?
|
186
185
|
query_request.merge!(:index_name => range_key[:index_name])
|
187
186
|
end
|
188
187
|
|
@@ -209,6 +208,7 @@ module Toy
|
|
209
208
|
end
|
210
209
|
|
211
210
|
# Default if not already set
|
211
|
+
options[:select] = :projected if options[:select].blank? && query_request[:index_name]
|
212
212
|
options[:select] ||= :all # :all, :projected, :count, []
|
213
213
|
if options[:select].is_a?(Array)
|
214
214
|
attrs_to_select = [options[:select].map(&:to_s)].flatten
|
data/lib/toy/dynamo/version.rb
CHANGED