yesod-persistent-0.2.1: Some helpers for using Persistent from Yesod.

Yesod.Persist

Synopsis

Documentation

class YesodPersist master whereSource

Associated Types

type YesodPersistBackend master :: (* -> *) -> * -> *Source

Methods

runDB :: MonadIO monad => YesodDB sub master a -> GGHandler sub master monad aSource

type YesodDB sub master = YesodPersistBackend master (GGHandler sub master IO)Source

get404 :: (PersistBackend t m, PersistEntity val, Monad (t m), Failure ErrorResponse m, MonadTrans t) => Key t val -> t m valSource

Get the given entity by ID, or return a 404 not found if it doesn't exist.

getBy404 :: (PersistBackend t m, PersistEntity val, Monad (t m), Failure ErrorResponse m, MonadTrans t) => Unique val t -> t m (Key t val, val)Source

Get the given entity by unique key, or return a 404 not found if it doesn't exist.