persistent-eventsource-0.2.0: Persistent based event sourcing.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Persistent.EventSource.EventStore

Synopsis

Documentation

class Projection a => EventStore a where Source #

Determines how events are stored and retrieved.

Methods

storeMany :: (MonadIO m, MonadSqlQuery m) => [Event a] -> m [Key (Event a)] Source #

getLastAppliedEventId :: (MonadIO m, MonadSqlQuery m) => m (Maybe (Key (Event a))) Source #

Nothing if no last applied event found.

markEventsApplied :: (MonadIO m, MonadSqlQuery m) => [Key (Event a)] -> m () Source #

loadUnappliedEvents :: (MonadIO m, MonadSqlQuery m) => Maybe (Key (Event a)) -> m [Entity (Event a)] Source #

Will load all events on nothing