eventsourcing-postgresql-0.9.0: PostgreSQL adaptor for eventsourcing.

Safe HaskellNone
LanguageHaskell2010

Database.CQRS.PostgreSQL.SQLQuery

Synopsis

Documentation

data SQLQuery req resp Source #

A wrapper around a SELECT query that instantiates ReadModel so that it can be used by the application layer without said layer to be aware of SQL. The implementation can then be swapped for something else, e.g. for tests.

Constructors

SQLQuery 

Fields

Instances
(MonadIO m, FromRow resp, ToRow req) => ReadModel m (SQLQuery req resp) Source # 
Instance details

Defined in Database.CQRS.PostgreSQL.SQLQuery

Associated Types

type ReadModelQuery (SQLQuery req resp) :: Type #

type ReadModelResponse (SQLQuery req resp) :: Type #

Methods

query :: SQLQuery req resp -> ReadModelQuery (SQLQuery req resp) -> m (ReadModelResponse (SQLQuery req resp)) #

type ReadModelResponse (SQLQuery req resp) Source # 
Instance details

Defined in Database.CQRS.PostgreSQL.SQLQuery

type ReadModelResponse (SQLQuery req resp) = [resp]
type ReadModelQuery (SQLQuery req resp) Source # 
Instance details

Defined in Database.CQRS.PostgreSQL.SQLQuery

type ReadModelQuery (SQLQuery req resp) = req