packages feed

monad-persist 0.0.1.2 → 0.0.1.3

raw patch · 5 files changed

+26/−3 lines, 5 filesPVP: minor bump suggested

API additions: PVP suggests at least a minor version bump

API changes (from Hackage documentation)

+ Control.Monad.Persist: runSqlPoolPersistT :: MonadBaseControl IO m => SqlPersistT m a -> ConnectionPool -> m a

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+## 0.0.1.3 (October 10th, 2017)++- Added `runSqlPoolPersistT` ([#2](https://github.com/cjdev/monad-persist/pull/2)).+ ## 0.0.1.2 (April 26th, 2017)  - Removed the need for `MonadIO` when running `PersistT`, since `MonadBaseControl IO` is already enough.
README.md view
@@ -30,5 +30,8 @@ [Entity {entityKey = UserKey {unUserKey = SqlBackendKey {unSqlBackendKey = 1}}, entityVal = User {userName = "Alyssa", userEmail = "alyssa@example.com"}}] ``` +[For more information, see the documentation on Hackage.][monad-persist]++[monad-persist]: http://hackage.haskell.org/package/monad-persist [mtl]: https://hackage.haskell.org/package/mtl [persistent]: https://hackage.haskell.org/package/persistent
library/Control/Monad/Persist.hs view
@@ -35,6 +35,7 @@   , MonadSqlPersist   , SqlPersistT   , runSqlPersistT+  , runSqlPoolPersistT   ) where  import qualified Database.Persist.Sql as Sql@@ -62,6 +63,7 @@ import Data.Text (Text) import Database.Persist.Sql   ( CautiousMigration+  , ConnectionPool   , DeleteCascade   , Entity(..)   , Filter@@ -83,6 +85,7 @@   , Unique   , Update   , runSqlConn+  , runSqlPool   )  -- | A concrete monad transformer that implements 'MonadPersist'. To run it, use@@ -111,6 +114,12 @@ runSqlPersistT :: MonadBaseControl IO m => SqlPersistT m a -> SqlBackend -> m a runSqlPersistT (PersistT m) = runSqlConn m {-# INLINE runSqlPersistT #-}++-- | Runs a 'SqlPersistT' computation against a SQL database using a pool of+-- connections. The computation is run inside a transaction.+runSqlPoolPersistT :: MonadBaseControl IO m => SqlPersistT m a -> ConnectionPool -> m a+runSqlPoolPersistT (PersistT m) = runSqlPool m+{-# INLINE runSqlPoolPersistT #-}  instance MonadTransControl (PersistT backend) where   type StT (PersistT backend) a = StT (ReaderT SqlBackend) a
monad-persist.cabal view
@@ -1,12 +1,14 @@--- This file has been generated from package.yaml by hpack version 0.17.0.+-- This file has been generated from package.yaml by hpack version 0.17.1. -- -- see: https://github.com/sol/hpack  name:           monad-persist-version:        0.0.1.2+version:        0.0.1.3 synopsis:       An mtl-style typeclass and transformer for persistent. description:    An mtl-style typeclass and transformer for persistent. category:       Database+homepage:       https://github.com/cjdev/monad-persist#readme+bug-reports:    https://github.com/cjdev/monad-persist/issues author:         Alexis King <lexi.lambda@gmail.com> maintainer:     Alexis King <lexi.lambda@gmail.com> copyright:      2017 CJ Affiliate by Conversant@@ -20,6 +22,10 @@     package.yaml     README.md     stack.yaml++source-repository head+  type: git+  location: https://github.com/cjdev/monad-persist  library   hs-source-dirs:
package.yaml view
@@ -1,11 +1,12 @@ name: monad-persist-version: 0.0.1.2+version: 0.0.1.3 category: Database synopsis: An mtl-style typeclass and transformer for persistent. description: An mtl-style typeclass and transformer for persistent. author: Alexis King <lexi.lambda@gmail.com> maintainer: Alexis King <lexi.lambda@gmail.com> copyright: 2017 CJ Affiliate by Conversant+github: cjdev/monad-persist  license: ISC extra-source-files: