Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines the MonadSqlQuery
type class that a monad can make an instance of
in order to interpret how to run a
SqlQueryRep
sent by a lifted function from
Database.Persist.Monad.Shim
.
Synopsis
- class (Monad m, MonadSqlQuery (TransactionM m)) => MonadSqlQuery m where
- type TransactionM m :: Type -> Type
- runQueryRep :: Typeable record => SqlQueryRep record a -> m a
- withTransaction :: TransactionM m a -> m a
Documentation
class (Monad m, MonadSqlQuery (TransactionM m)) => MonadSqlQuery m where Source #
The type-class for monads that can run persistent database queries.
type TransactionM m :: Type -> Type Source #
runQueryRep :: Typeable record => SqlQueryRep record a -> m a Source #
Interpret the given SQL query operation.
withTransaction :: TransactionM m a -> m a Source #
Run all queries in the given action using the same database connection.