persistent 1.3.1.1 → 1.3.2
raw patch · 7 files changed
+50/−1 lines, 7 files
Files
- Database/Persist/Class/PersistEntity.hs +4/−0
- Database/Persist/Class/PersistField.hs +5/−0
- Database/Persist/Class/PersistQuery.hs +10/−0
- Database/Persist/Class/PersistStore.hs +10/−0
- Database/Persist/Class/PersistUnique.hs +10/−0
- Database/Persist/Sql/Class.hs +10/−0
- persistent.cabal +1/−1
Database/Persist/Class/PersistEntity.hs view
@@ -68,6 +68,8 @@ fieldLens :: EntityField record field -> (forall f. Functor f => (field -> f field) -> Entity record -> f (Entity record)) +type family BackendSpecificUpdate backend record+ -- | updataing a database entity -- -- Persistent users use combinators to create these@@ -77,6 +79,8 @@ -- FIXME Replace with expr down the road , updateUpdate :: PersistUpdate }+ | BackendUpdate+ (BackendSpecificUpdate (PersistEntityBackend record) record) -- | query options --
Database/Persist/Class/PersistField.hs view
@@ -321,6 +321,11 @@ toPersistValue Inactive = PersistNull fromPersistValue PersistNull = Right Inactive fromPersistValue (PersistBool True) = Right Active+ fromPersistValue (PersistInt64 1) = Right Active+ fromPersistValue (PersistByteString i) = case readInt i of + Just (0,"") -> Left $ T.pack "PersistField Checkmark: found unexpected 0 value"+ Just (1,"") -> Right Active+ xs -> Left $ T.pack $ "PersistField Checkmark failed parsing PersistByteString xs["++show xs++"] i["++show i++"]" fromPersistValue (PersistBool False) = Left $ T.pack "PersistField Checkmark: found unexpected FALSE value" fromPersistValue other =
Database/Persist/Class/PersistQuery.hs view
@@ -21,6 +21,11 @@ import Control.Monad.Trans.List ( ListT ) import Control.Monad.Trans.Maybe ( MaybeT ) import Control.Monad.Trans.Error ( ErrorT )++#if MIN_VERSION_transformers(0,4,0)+import Control.Monad.Trans.Except ( ExceptT )+#endif+ import Control.Monad.Trans.Reader ( ReaderT ) import Control.Monad.Trans.Cont ( ContT ) import Control.Monad.Trans.State ( StateT )@@ -110,6 +115,11 @@ GO(ListT) GO(MaybeT) GOX(Error e, ErrorT e)++#if MIN_VERSION_transformers(0,4,0)+GO(ExceptT e)+#endif+ GO(ReaderT r) GO(ContT r) GO(StateT s)
Database/Persist/Class/PersistStore.hs view
@@ -24,6 +24,11 @@ import Control.Monad.Trans.List ( ListT ) import Control.Monad.Trans.Maybe ( MaybeT ) import Control.Monad.Trans.Error ( ErrorT )++#if MIN_VERSION_transformers(0,4,0)+import Control.Monad.Trans.Except ( ExceptT )+#endif+ import Control.Monad.Trans.Reader ( ReaderT ) import Control.Monad.Trans.Cont ( ContT ) import Control.Monad.Trans.State ( StateT )@@ -121,6 +126,11 @@ GO(ListT) GO(MaybeT) GOX(Error e, ErrorT e)++#if MIN_VERSION_transformers(0,4,0)+GO(ExceptT e)+#endif+ GO(ReaderT r) GO(ContT r) GO(StateT s)
Database/Persist/Class/PersistUnique.hs view
@@ -23,6 +23,11 @@ import Control.Monad.Trans.List ( ListT ) import Control.Monad.Trans.Maybe ( MaybeT ) import Control.Monad.Trans.Error ( ErrorT )++#if MIN_VERSION_transformers(0,4,0)+import Control.Monad.Trans.Except ( ExceptT )+#endif+ import Control.Monad.Trans.Reader ( ReaderT ) import Control.Monad.Trans.Cont ( ContT ) import Control.Monad.Trans.State ( StateT )@@ -140,6 +145,11 @@ GO(ListT) GO(MaybeT) GOX(Error e, ErrorT e)++#if MIN_VERSION_transformers(0,4,0)+GO(ExceptT e)+#endif+ GO(ReaderT r) GO(ContT r) GO(StateT s)
Database/Persist/Sql/Class.hs view
@@ -29,6 +29,11 @@ import Control.Monad.Trans.List ( ListT ) import Control.Monad.Trans.Maybe ( MaybeT ) import Control.Monad.Trans.Error ( ErrorT, Error)++#if MIN_VERSION_transformers(0,4,0)+import Control.Monad.Trans.Except ( ExceptT )+#endif+ import Control.Monad.Trans.Cont ( ContT ) import Control.Monad.Trans.State ( StateT ) import Control.Monad.Trans.Writer ( WriterT )@@ -71,6 +76,11 @@ GO(ListT) GO(MaybeT) GOX(Error e, ErrorT e)++#if MIN_VERSION_transformers(0,4,0)+GO(ExceptT e)+#endif+ GO(ReaderT r) GO(ContT r) GO(StateT s)
persistent.cabal view
@@ -1,5 +1,5 @@ name: persistent-version: 1.3.1.1+version: 1.3.2 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>