packages feed

persistent-sqlite 1.1.4.1 → 1.1.5

raw patch · 2 files changed

+10/−3 lines, 2 files

Files

Database/Persist/Sqlite.hs view
@@ -12,6 +12,7 @@     , module Database.Persist.GenericSql     , SqliteConf (..)     , runSqlite+    , wrapConnection     ) where  import Database.Persist hiding (Entity (..))@@ -37,6 +38,7 @@ import qualified Data.Conduit.List as CL import Control.Applicative import Data.Int (Int64)+import Control.Monad ((>=>))  createSqlitePool :: MonadIO m => Text -> Int -> m ConnectionPool createSqlitePool s = createSqlPool $ open' s@@ -52,8 +54,13 @@ withSqliteConn = withSqlConn . open'  open' :: Text -> IO Connection-open' s = do-    conn <- Sqlite.open s+open' = Sqlite.open >=> wrapConnection++-- | Wrap up a raw 'Sqlite.Connection' as a Persistent SQL 'Connection'.+--+-- Since 1.1.5+wrapConnection :: Sqlite.Connection -> IO Connection+wrapConnection conn = do     smap <- newIORef $ Map.empty     return Connection         { prepare = prepare' conn
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name:            persistent-sqlite-version:         1.1.4.1+version:         1.1.5 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>