nexia_event_store 0.3.0 → 0.3.2
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/db/migrations/001_create_event_store_events.rb +7 -1
- data/lib/event_store/client.rb +3 -2
- 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: 821d9fdfe00adbc45635ae0bada2349c5564e5d8
|
4
|
+
data.tar.gz: fb45e3fed169b16f47dce1498820191ee94fc383
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 006af4e166588883f85de128f9fcd692729c1b62e62782474fbf2842009f9f70f21cbb33a6fdcfd34703d487e7fae5fb856b85923e5b5da6a98f71cc915705d5
|
7
|
+
data.tar.gz: a8cc79ee910ae08dd2f2005f7a5b5874b986ec78fdc444681accaa397c621d16b53deab36b85dd28767c7eddb67191b4b1a7e60a35b8ee2fb5cce15c7154f1e5
|
@@ -7,6 +7,7 @@ Sequel.migration do
|
|
7
7
|
version BIGINT NOT NULL,
|
8
8
|
aggregate_id varchar(36) NOT NULL,
|
9
9
|
fully_qualified_name varchar(512) NOT NULL,
|
10
|
+
sub_key varchar(512) NOT NULL,
|
10
11
|
occurred_at TIMESTAMPTZ NOT NULL,
|
11
12
|
serialized_event VARBINARY(32768) NOT NULL)
|
12
13
|
|
@@ -18,6 +19,7 @@ Sequel.migration do
|
|
18
19
|
version ENCODING COMMONDELTA_COMP,
|
19
20
|
aggregate_id ENCODING RLE,
|
20
21
|
fully_qualified_name ENCODING AUTO,
|
22
|
+
sub_key ENCODING AUTO,
|
21
23
|
occurred_at ENCODING BLOCKDICT_COMP,
|
22
24
|
serialized_event ENCODING AUTO
|
23
25
|
)
|
@@ -26,6 +28,7 @@ Sequel.migration do
|
|
26
28
|
version,
|
27
29
|
aggregate_id,
|
28
30
|
fully_qualified_name,
|
31
|
+
sub_key,
|
29
32
|
occurred_at,
|
30
33
|
serialized_event
|
31
34
|
FROM #{EventStore.fully_qualified_table}
|
@@ -39,6 +42,7 @@ Sequel.migration do
|
|
39
42
|
version ENCODING DELTAVAL,
|
40
43
|
aggregate_id ENCODING RLE,
|
41
44
|
fully_qualified_name ENCODING RLE,
|
45
|
+
sub_key ENCODING RLE,
|
42
46
|
occurred_at ENCODING RLE,
|
43
47
|
serialized_event ENCODING AUTO
|
44
48
|
)
|
@@ -46,12 +50,14 @@ Sequel.migration do
|
|
46
50
|
SELECT version,
|
47
51
|
aggregate_id,
|
48
52
|
fully_qualified_name,
|
53
|
+
sub_key,
|
49
54
|
occurred_at,
|
50
55
|
serialized_event
|
51
56
|
FROM #{EventStore.fully_qualified_table}
|
52
57
|
ORDER BY aggregate_id,
|
53
58
|
occurred_at,
|
54
|
-
fully_qualified_name
|
59
|
+
fully_qualified_name,
|
60
|
+
sub_key
|
55
61
|
SEGMENTED BY HASH(aggregate_id) ALL NODES
|
56
62
|
KSAFE 1;>
|
57
63
|
end
|
data/lib/event_store/client.rb
CHANGED
@@ -51,7 +51,7 @@ module EventStore
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def peek
|
54
|
-
|
54
|
+
@aggregate.last_event
|
55
55
|
end
|
56
56
|
|
57
57
|
def raw_snapshot
|
@@ -91,7 +91,8 @@ module EventStore
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def translate_event(event_hash)
|
94
|
-
|
94
|
+
return if event_hash.empty?
|
95
|
+
occurred_at = TimeHacker.translate_occurred_at_from_local_to_gmt(event_hash[:occurred_at])
|
95
96
|
SerializedEvent.new event_hash[:fully_qualified_name], event_hash[:serialized_event], event_hash[:version], occurred_at
|
96
97
|
end
|
97
98
|
end
|
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.3.
|
4
|
+
version: 0.3.2
|
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: 2014-10-
|
12
|
+
date: 2014-10-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -271,7 +271,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
271
|
version: '0'
|
272
272
|
requirements: []
|
273
273
|
rubyforge_project:
|
274
|
-
rubygems_version: 2.
|
274
|
+
rubygems_version: 2.4.2
|
275
275
|
signing_key:
|
276
276
|
specification_version: 4
|
277
277
|
summary: Ruby implementation of an EventSource (A+ES) for the Nexia Ecosystem
|