ruby_event_store-active_record 2.8.0 → 2.9.0
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42559ca51848ea6e388b9cfe5a73c9058691a4a2281000c6ba0da5f3899a40e
|
4
|
+
data.tar.gz: 17440ba2550814acb3bc4d0a9522570783ab21306c318dac218b85d98065f1e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2870b19f168fd7730a9e3a1ab4cdfe7ec8d4c1ff3b9bda2d6f9a2f4a769a9e4c54f4fe85149525c1b4d5ee950151f01276fb17a079c1f1fd09753008dc80b3f7
|
7
|
+
data.tar.gz: 5c72abb8e403fb1e2a2f387943c04de84992ce7e6517feb0a457e949ef0c9b74eb3d6aabd60f2e7e15d85772b925e6a6e8c5e2ea5a65f66606460f881680a4d1
|
@@ -163,20 +163,28 @@ module RubyEventStore
|
|
163
163
|
)
|
164
164
|
end
|
165
165
|
|
166
|
+
def time_comparison_field(specification)
|
167
|
+
if specification.time_sort_by_as_of?
|
168
|
+
"COALESCE(#{@event_klass.table_name}.valid_at, #{@event_klass.table_name}.created_at)"
|
169
|
+
else
|
170
|
+
"#{@event_klass.table_name}.created_at"
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
166
174
|
def older_than_condition(specification)
|
167
|
-
["#{
|
175
|
+
["#{time_comparison_field(specification)} < ?", specification.older_than]
|
168
176
|
end
|
169
177
|
|
170
178
|
def older_than_or_equal_condition(specification)
|
171
|
-
["#{
|
179
|
+
["#{time_comparison_field(specification)} <= ?", specification.older_than_or_equal]
|
172
180
|
end
|
173
181
|
|
174
182
|
def newer_than_condition(specification)
|
175
|
-
["#{
|
183
|
+
["#{time_comparison_field(specification)} > ?", specification.newer_than]
|
176
184
|
end
|
177
185
|
|
178
186
|
def newer_than_or_equal_condition(specification)
|
179
|
-
["#{
|
187
|
+
["#{time_comparison_field(specification)} >= ?", specification.newer_than_or_equal]
|
180
188
|
end
|
181
189
|
|
182
190
|
def order(spec)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_event_store-active_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arkency
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_event_store
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.9.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.9.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|