Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class Projection a => EventStore a where
- storeMany :: (MonadIO m, MonadSqlQuery m) => [Event a] -> m [Key (Event a)]
- getLastAppliedEventId :: (MonadIO m, MonadSqlQuery m) => m (Maybe (Key (Event a)))
- markEventsApplied :: (MonadIO m, MonadSqlQuery m) => [Key (Event a)] -> m ()
- loadUnappliedEvents :: (MonadIO m, MonadSqlQuery m) => Maybe (Key (Event a)) -> m [Entity (Event a)]
Documentation
class Projection a => EventStore a where Source #
Determines how events are stored and retrieved.
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