Safe Haskell | None |
---|---|
Language | Haskell2010 |
Database.Persist.Monad.Class
Description
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 :: Type -> Type) where
- type TransactionM (m :: Type -> Type) :: 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 :: Type -> Type) where Source #
The type-class for monads that can run persistent database queries.
Methods
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.