engine v0.1.2 Engine.Storage.Postgres

Interface with the Postgre eventstore lib, driver to save and read to POSTGRE.

Summary

Functions

Save only one event to the stream

Save a list of events to the stream

Save snapshot after checking the frequency config, adding -snapshot to its namespace

Load all events for that stream

Load events, but from a specific position

Load the last snapshot for that stream

Functions

append_event(stream, event)

Save only one event to the stream.

append_events(stream, events)

Save a list of events to the stream.

append_snapshot(stream, state, period \\ nil)

Save snapshot after checking the frequency config, adding -snapshot to its namespace

load_events(stream)

Load all events for that stream

load_events(stream, position)

Load events, but from a specific position

load_snapshot(stream)

Load the last snapshot for that stream