persistent-typed-db 0.1.0.6 → 0.1.0.7
raw patch · 3 files changed
+21/−2 lines, 3 filesdep ~esqueletodep ~persistentPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: esqueleto, persistent
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- persistent-typed-db.cabal +2/−2
- src/Database/Persist/Typed.hs +15/−0
CHANGELOG.md view
@@ -1,5 +1,9 @@ # CHANGELOG +# 0.1.0.7++- Support `persistent-2.14` [#18](https://github.com/parsonsmatt/persistent-typed-db/pull/18)+ # 0.1.0.6 - Support `aeson-2`
persistent-typed-db.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: persistent-typed-db-version: 0.1.0.6+version: 0.1.0.7 synopsis: Type safe access to multiple database schemata. description: See README.md for more details, examples, and fun. category: Web@@ -36,7 +36,7 @@ , http-api-data , monad-logger , path-pieces- , persistent >=2.13.0 && < 2.14+ , persistent >=2.13.0 && < 2.15 , resource-pool , resourcet >=1.2.0 , template-haskell
src/Database/Persist/Typed.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -63,6 +64,12 @@ import Web.HttpApiData (FromHttpApiData, ToHttpApiData) import Web.PathPieces (PathPiece) +#if MIN_VERSION_persistent(2,14,0)+import Database.Persist.Class.PersistEntity (SafeToInsert)+#else+import GHC.Exts (Constraint)+#endif+ -- | A wrapper around 'SqlBackend' type. To specialize this to a specific -- database, fill in the type parameter. --@@ -925,6 +932,7 @@ , MonadIO m , PersistStoreWrite backend , PersistUniqueRead backend+ , MySafeToInsert record ) => Unique record -- ^ uniqueness constraint to find by -> record -- ^ new record to insert@@ -936,3 +944,10 @@ where updateGetEntity (Entity k _) upds = (Entity k) `fmap` (updateGet k upds)++type MySafeToInsert a =+#if MIN_VERSION_persistent(2,14,0)+ SafeToInsert a+#else+ () :: Constraint+#endif