cqrs-0.9.0: Command-Query Responsibility Segregation

Safe HaskellNone

Data.CQRS.Query

Synopsis

Documentation

data PersistedEvent e

Persisted Event.

Constructors

PersistedEvent 

Fields

peAggregateGUID :: !GUID

GUID of the aggregate.

peEvent :: !e

Event.

peSequenceNumber :: !Int

Sequence number within the aggregate.

Instances

Functor PersistedEvent 
Eq e => Eq (PersistedEvent e) 
Ord e => Ord (PersistedEvent e) 
Show e => Show (PersistedEvent e) 
NFData e_1627409331 => NFData (PersistedEvent e_1627409331) 

class EventStoreBackend esb

Event stores are the backend used for reading and storing all the information about recorded events.

data GUID

A Globally Unique IDentifier.

Instances

Eq GUID 
Data GUID 
Ord GUID 
Show GUID

Showing a GUID.

Typeable GUID 
Serializable GUID

Serialize instance.

NFData GUID 

data Repository e b Source

Repository consisting of an event store and an event bus.

enumerateAndStreamEvents :: (Show e, Serializable e, EventStoreBackend b) => Repository e b -> Source (ResourceT IO) [PersistedEvent e]Source

Enumerate all events which satisfy criteria and stream all new events from repository. All events which arrive while enumerating are buffered until enumeration completes.

enumerateEventStore :: (Serializable e, EventStoreBackend b) => Repository e b -> Source (ResourceT IO) [PersistedEvent e]Source

Enumerate all events which satisfy certain criteria from event store associated with repository.