eventium-sqlite-0.1.0: SQLite implementations for eventium
Safe HaskellNone
LanguageHaskell2010

Eventium.Store.Sqlite

Description

Defines an Sqlite event store.

Synopsis

Documentation

sqliteEventStoreWriter :: forall (m :: Type -> Type) entity serialized. (MonadIO m, PersistEntity entity, PersistEntityBackend entity ~ SqlBackend, SafeToInsert entity) => SqlEventStoreConfig entity serialized -> VersionedEventStoreWriter (SqlPersistT m) serialized Source #

An EventStoreWriter that uses an SQLite database as a backend. Use SqlEventStoreConfig to configure this event store.

initializeSqliteEventStore :: (MonadIO m, PersistEntity entity, PersistEntityBackend entity ~ SqlBackend) => SqlEventStoreConfig entity serialized -> ConnectionPool -> m () Source #

This functions runs the migrations required to create the events table and also adds an index on the UUID column.