eventstore v0.4.3 EventStore.Storage

Storage of events to a PostgreSQL database

Uses a pool of connections to the database. This is for increased concurrency and performance, but with an upper limit on concurrent access.

Summary

Functions

Acknowledge receipt of an event by id, for a single subscription

Create a new event stream with the given unique identifier

Initialise the PostgreSQL database by creating the tables and indexes

Get the id of the last event persisted to storage

Get the latest version of events persisted to the given stream

Read events for all streams forward from the starting event id, use zero for all events for all streams

Read a snapshot, if available, for a given source

Read events for the given stream forward from the starting version, use zero for all events for the stream

Record a snapshot of the data and metadata for a given source

Reset the PostgreSQL database by deleting all rows

Get the id and version of the stream with the given uuid

Create, or locate an existing, persistent subscription to a stream using a unique name

Get all known subscriptions, to any stream

Unsubscribe from an existing named subscription to a stream

Functions

ack_last_seen_event(stream_uuid, subscription_name, last_seen_event_id, last_seen_stream_version)

Acknowledge receipt of an event by id, for a single subscription

create_stream(stream_uuid)

Create a new event stream with the given unique identifier

initialize_store!()

Initialise the PostgreSQL database by creating the tables and indexes

latest_event_id()

Get the id of the last event persisted to storage

latest_stream_version(stream_uuid)

Get the latest version of events persisted to the given stream

read_all_streams_forward(start_event_id \\ 0, count \\ nil)

Read events for all streams forward from the starting event id, use zero for all events for all streams

read_snapshot(source_uuid)

Read a snapshot, if available, for a given source

read_stream_forward(stream_id, start_version \\ 0, count \\ nil)

Read events for the given stream forward from the starting version, use zero for all events for the stream

record_snapshot(snapshot)

Record a snapshot of the data and metadata for a given source

reset!()

Reset the PostgreSQL database by deleting all rows

stream_info(stream_uuid)

Get the id and version of the stream with the given uuid

subscribe_to_stream(stream_uuid, subscription_name)

Create, or locate an existing, persistent subscription to a stream using a unique name

subscriptions()

Get all known subscriptions, to any stream

unsubscribe_from_stream(stream_uuid, subscription_name)

Unsubscribe from an existing named subscription to a stream