persistent 0.1
This commit is contained in:
parent
b8c74e86ff
commit
e4dd6ddd2c
@ -26,7 +26,7 @@ import Text.Hamlet
|
||||
import Data.Time (Day)
|
||||
import Control.Applicative
|
||||
import Database.Persist (PersistField)
|
||||
import Database.Persist.Helper (EntityDef (..))
|
||||
import Database.Persist.Base (EntityDef (..))
|
||||
import Data.Char (isAlphaNum, toUpper, isUpper)
|
||||
import Language.Haskell.TH.Syntax
|
||||
import Control.Monad (liftM, join)
|
||||
|
||||
@ -153,8 +153,10 @@ crudHelper title me isPost = do
|
||||
%a!href=@toMaster.CrudDeleteR.toSinglePiece.fst.e@ Delete
|
||||
|]
|
||||
|
||||
defaultCrud :: (PersistEntity i, YesodPersist a, PersistMonad i ~ YesodDB a)
|
||||
=> a -> Crud a i
|
||||
defaultCrud
|
||||
:: (PersistEntity i, PersistBackend (YesodDB a (GHandler (Crud a i) a)),
|
||||
YesodPersist a)
|
||||
=> a -> Crud a i
|
||||
defaultCrud = const Crud
|
||||
{ crudSelect = runDB $ select [] []
|
||||
, crudReplace = \a -> runDB . replace a
|
||||
|
||||
@ -8,7 +8,7 @@ module Yesod.Yesod
|
||||
, YesodSite (..)
|
||||
-- ** Persistence
|
||||
, YesodPersist (..)
|
||||
, PersistEntity (..)
|
||||
, module Database.Persist
|
||||
-- ** Breadcrumbs
|
||||
, YesodBreadcrumbs (..)
|
||||
, breadcrumbs
|
||||
@ -30,7 +30,7 @@ import Web.ClientSession (getKey, defaultKeyFile)
|
||||
import qualified Web.ClientSession as CS
|
||||
import Data.Monoid (mempty)
|
||||
import Data.ByteString.UTF8 (toString)
|
||||
import Database.Persist (PersistEntity (..))
|
||||
import Database.Persist
|
||||
|
||||
import Web.Routes.Quasi (QuasiSite (..), Routes)
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: yesod
|
||||
version: 0.3.1.1
|
||||
version: 0.4.0
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Michael Snoyman <michael@snoyman.com>
|
||||
@ -40,7 +40,7 @@ library
|
||||
control-monad-attempt >= 0.3 && < 0.4,
|
||||
cereal >= 0.2 && < 0.3,
|
||||
old-locale >= 1.0.0.2 && < 1.1,
|
||||
persistent >= 0.0.0 && < 0.1
|
||||
persistent >= 0.1.0 && < 0.2
|
||||
exposed-modules: Yesod
|
||||
Yesod.Content
|
||||
Yesod.Dispatch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user