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

Safe HaskellSafe-Infered

Yesod.Persist

Synopsis

Documentation

class YesodPersist master whereSource

Associated Types

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

Methods

runDB :: YesodDB sub master a -> GHandler sub master aSource

type YesodDB sub master = YesodPersistBackend master (GHandler sub master)Source

get404 :: (PersistStore b m, PersistEntity val, Monad (b m), m ~ GHandler sub master, MonadTrans b) => Key b val -> b m valSource

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

getBy404 :: (PersistUnique b m, PersistEntity val, m ~ GHandler sub master, Monad (b m), MonadTrans b, PersistEntityBackend val ~ b) => Unique val b -> b m (Entity val)Source

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