ruby_event_store-active_record 2.8.0 → 2.8.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdabc01585e316bdc346af6b70751ff948c9d47e0cc10e08eabb0541f387fc68
|
4
|
+
data.tar.gz: 52a70e45996c0bedf4b7472fafaa1e3b655e126ce7c926ac6f0b0dc5314e55f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82a515a643f3f8bbad68d88e691dc687057e7f66ae7ab4a34567433c169208c47b3fcdf8fb37a8521808600d680386833e28357fa55d850667284d071e7e2a12
|
7
|
+
data.tar.gz: 67c3a32693f03ed905f40ee74b3d31a57b08f12c326cbd5ca9de28e4a062693b76b3d17cd4499093e5d0f3f3f7359a5a3226a95f53306af4945a2a2a6a3e6508
|
@@ -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.8.
|
4
|
+
version: 2.8.1
|
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-16 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.8.
|
19
|
+
version: 2.8.1
|
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.8.
|
26
|
+
version: 2.8.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|