evt-event_source-postgres 0.14.0.0 → 0.15.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/event_source/postgres.rb +1 -0
- data/lib/event_source/postgres/read.rb +3 -2
- data/lib/event_source/postgres/read/iterator.rb +17 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eba580b41148c557fc11aea85e67c6f1b1028929
|
4
|
+
data.tar.gz: 11a79b1f83208c3378609f527f245d6728cf3e37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddfc4f1204bb81cf5ac65b8930e8f15eb034c4135b3c35dd8e79b4c7100e1fcb07cfca07fb5669e6f9118e0c10842f5da81d3e7d962e0fd3189b3b70a1429630
|
7
|
+
data.tar.gz: d85e104ecf8dd27fe46247355b4a1bb35fd3fdcfeee5fc2cc480342f02c52d6d0d1021d8bfa4d96665e66b4270a7ac6a06a9ad153be33f70b9d2e4c58238fbae
|
@@ -19,4 +19,5 @@ require 'event_source/postgres/get/select_statement'
|
|
19
19
|
require 'event_source/postgres/get'
|
20
20
|
require 'event_source/postgres/get/last/select_statement'
|
21
21
|
require 'event_source/postgres/get/last'
|
22
|
+
require 'event_source/postgres/read/iterator'
|
22
23
|
require 'event_source/postgres/read'
|
@@ -3,8 +3,9 @@ module EventSource
|
|
3
3
|
class Read
|
4
4
|
include EventSource::Read
|
5
5
|
|
6
|
-
def configure(
|
7
|
-
|
6
|
+
def configure(session: nil)
|
7
|
+
Iterator.configure(self, stream_name, position: position)
|
8
|
+
Get.configure(self.iterator, batch_size: batch_size, session: session)
|
8
9
|
end
|
9
10
|
end
|
10
11
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module EventSource
|
2
|
+
module Postgres
|
3
|
+
class Read
|
4
|
+
class Iterator
|
5
|
+
include EventSource::Read::Iterator
|
6
|
+
|
7
|
+
def last_position
|
8
|
+
unless EventSource::StreamName.category?(stream_name)
|
9
|
+
batch.last.position
|
10
|
+
else
|
11
|
+
batch.last.global_position
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evt-event_source-postgres
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Eventide Project
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: evt-event_source
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- lib/event_source/postgres/log.rb
|
115
115
|
- lib/event_source/postgres/put.rb
|
116
116
|
- lib/event_source/postgres/read.rb
|
117
|
+
- lib/event_source/postgres/read/iterator.rb
|
117
118
|
- lib/event_source/postgres/session.rb
|
118
119
|
- lib/event_source/postgres/settings.rb
|
119
120
|
- lib/event_source/postgres/write.rb
|