nexia_event_store 0.5.2 → 0.5.3
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 +4 -4
- data/lib/event_store/event_stream.rb +4 -3
- data/lib/event_store/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8b1eda40b515240bcaa7be394861f5ad1ef3649
|
4
|
+
data.tar.gz: 7f80e07b8959230608617c66773030014f582bd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc0b5254311cf5d3f70caa8f92d85fac969257712f199556984e4918faf59903ee4aeebcbed997581f5a1386b3f770759ca7fae55565239e3eb5e7844e3734a6
|
7
|
+
data.tar.gz: 0ba2ee0e1fd520c1cfbea6dec5a2d53c46ab69d62efc9e6c76201cb080ea450bcd79aa17c39c824a1b3179e27ba01a5803a977ce1033de3d05c460c85d41db0b
|
@@ -39,16 +39,17 @@ module EventStore
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def last_event_before(start_time, fully_qualified_names = [])
|
42
|
-
|
42
|
+
timestampz = start_time.strftime("%Y-%m-%d %H:%M:%S%z")
|
43
|
+
names = fully_qualified_names.map { |n| "'#{n}'" }.join(',')
|
43
44
|
last_event_before_query = <<-EOSQL
|
44
45
|
select * from
|
45
46
|
(select *, last_value(occurred_at)
|
46
47
|
over(partition by fully_qualified_name order by occurred_at
|
47
48
|
ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) as last
|
48
49
|
from #{@event_table}
|
49
|
-
where aggregate_id =
|
50
|
+
where aggregate_id = '#{@id}'
|
50
51
|
and fully_qualified_name in (#{names})
|
51
|
-
and occurred_at <
|
52
|
+
and occurred_at < '#{timestampz}') as subquery
|
52
53
|
where occurred_at = last
|
53
54
|
EOSQL
|
54
55
|
|
data/lib/event_store/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexia_event_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Saieg, John Colvin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -273,7 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
273
273
|
version: '0'
|
274
274
|
requirements: []
|
275
275
|
rubyforge_project:
|
276
|
-
rubygems_version: 2.4.
|
276
|
+
rubygems_version: 2.4.5
|
277
277
|
signing_key:
|
278
278
|
specification_version: 4
|
279
279
|
summary: Ruby implementation of an EventSource (A+ES) for the Nexia Ecosystem
|