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

Safe HaskellNone

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 (t m), PersistEntity val, Monad (t m), m ~ GHandler sub master, MonadTrans t, PersistMonadBackend (t m) ~ PersistEntityBackend val) => Key val -> t m valSource

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

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

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