Class: EventSource::Postgres::Read::Iterator

Inherits:
Object
  • Object
show all
Includes:
Read::Iterator
Defined in:
lib/event_source/postgres/read/iterator.rb

Instance Method Summary collapse

Instance Method Details

#last_positionObject



7
8
9
10
11
12
13
# File 'lib/event_source/postgres/read/iterator.rb', line 7

def last_position
  unless EventSource::Postgres::StreamName.category?(stream_name)
    batch.last.position
  else
    batch.last.global_position
  end
end