Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data EventTable
- type EventMigration = PreviousEventTableName -> EventTableName -> Connection -> IO ()
- type ChunkSize = Int
- type PreviousEventTableName = String
- type EventTableName = String
- type EventTableBaseName = String
- data PostgresEvent model event = PostgresEvent {
- connectionPool :: Pool Connection
- eventTableName :: EventTableName
- modelIORef :: IORef (NumberedModel model)
- app :: model -> Stored event -> model
- seed :: model
- chunkSize :: ChunkSize
- simplePool' :: MonadUnliftIO m => ConnectInfo -> m (Pool Connection)
- simplePool :: MonadUnliftIO m => IO Connection -> m (Pool Connection)
- postgresWriteModelNoMigration :: (FromJSON e, WriteModel (PostgresEventTrans m e)) => Pool Connection -> EventTableName -> (m -> Stored e -> m) -> m -> IO (PostgresEvent m e)
- postgresWriteModel :: Pool Connection -> EventTable -> (m -> Stored e -> m) -> m -> IO (PostgresEvent m e)
Documentation
type EventMigration = PreviousEventTableName -> EventTableName -> Connection -> IO () Source #
type PreviousEventTableName = String Source #
type EventTableName = String Source #
type EventTableBaseName = String Source #
data PostgresEvent model event Source #
PostgresEvent | |
|
Instances
simplePool' :: MonadUnliftIO m => ConnectInfo -> m (Pool Connection) Source #
simplePool :: MonadUnliftIO m => IO Connection -> m (Pool Connection) Source #
postgresWriteModelNoMigration :: (FromJSON e, WriteModel (PostgresEventTrans m e)) => Pool Connection -> EventTableName -> (m -> Stored e -> m) -> m -> IO (PostgresEvent m e) Source #
Setup the persistance model and verify that the tables exist.
postgresWriteModel :: Pool Connection -> EventTable -> (m -> Stored e -> m) -> m -> IO (PostgresEvent m e) Source #
Setup the persistance model and verify that the tables exist.