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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 68c942d8feff2931948d186e19525fe08dba49ee
4
- data.tar.gz: 3fe781d10b0cffc9d9ad04895cc23b06aa5c0a0a
3
+ metadata.gz: eba580b41148c557fc11aea85e67c6f1b1028929
4
+ data.tar.gz: 11a79b1f83208c3378609f527f245d6728cf3e37
5
5
  SHA512:
6
- metadata.gz: 76a88b8684a1edc793f9daa976dbe74865e6752a87601cfc3e3f0d836789f1afc461eb46cd179a16edddb3712f4b440b87ccc895296da6f92c9c8dc7871e5271
7
- data.tar.gz: 0c45cde102edd51e9d81b39571aa227386bf85c36af676c1b92ea1684f0615081497938d9fe867144ab0bf6002f47ac32e1238f5462375daea8cf1f4f01f5f0d
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(batch_size: nil, session: nil)
7
- Get.configure(self, batch_size: batch_size, session: session)
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.14.0.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-01 00:00:00.000000000 Z
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