dynamoid_advanced_where 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dynamoid_advanced_where/query_materializer.rb +9 -8
- data/lib/dynamoid_advanced_where/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a85cd45266e1210f64c5d4bd1187416c2643aeb5de64d66c9f9ad9fbd4ba456
|
4
|
+
data.tar.gz: ab0281d70cdc10879af23d28e9fefac40679e3c28da55d19244b828718c30d5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42dfd340ba7191b51b172615cfe7cef602906f88b30f5023e519bbea01e12e9ad2af7833607500cb9408a88b0f13144237dea0cbdfe36ed22bb3124f6e00ffe8
|
7
|
+
data.tar.gz: a3b3fb6011989832dc5ae91cca827a63e17fb4a920d897a5ab0c8d76bf56d5c1ca822552f112f77fe3c3b7b62db1c183988cbf63ff48a83ea1135fa1c388b497
|
data/Gemfile.lock
CHANGED
@@ -54,28 +54,29 @@ module DynamoidAdvancedWhere
|
|
54
54
|
|
55
55
|
query[:limit] = query_builder.record_limit if query_builder.record_limit
|
56
56
|
|
57
|
-
|
57
|
+
query[:exclusive_start_key] = start_hash
|
58
58
|
|
59
59
|
Enumerator.new do |yielder|
|
60
60
|
loop do
|
61
|
-
query[:exclusive_start_key] = page_start
|
62
61
|
results = yield(query)
|
63
62
|
|
64
|
-
|
65
|
-
klass.from_database(item.symbolize_keys)
|
66
|
-
end
|
67
|
-
|
68
|
-
yielder.yield(items, results)
|
63
|
+
yielder.yield(construct_items(results.items), results)
|
69
64
|
|
70
65
|
query[:limit] = query[:limit] - results.items.length if query[:limit]
|
71
66
|
|
72
67
|
break if results.last_evaluated_key.nil? || query[:limit]&.zero?
|
73
68
|
|
74
|
-
|
69
|
+
query[:exclusive_start_key] = results.last_evaluated_key
|
75
70
|
end
|
76
71
|
end.lazy
|
77
72
|
end
|
78
73
|
|
74
|
+
def construct_items(items)
|
75
|
+
(items || []).map do |item|
|
76
|
+
klass.from_database(item)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
79
80
|
def each_page_via_query
|
80
81
|
query = {
|
81
82
|
table_name: table_name,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamoid_advanced_where
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Malinconico
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dynamoid
|