groundhog-sqlite 0.8 → 0.8.0.1
raw patch · 3 files changed
+14/−2 lines, 3 filesdep ~groundhogPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
Dependency ranges changed: groundhog
API changes (from Hackage documentation)
+ Database.Groundhog.Sqlite: instance Database.Groundhog.Core.TryConnectionManager Database.Groundhog.Sqlite.Sqlite
Files
- Database/Groundhog/Sqlite.hs +9/−0
- changelog +3/−0
- groundhog-sqlite.cabal +2/−2
Database/Groundhog/Sqlite.hs view
@@ -140,6 +140,15 @@ liftIO $ S.exec c "COMMIT" return x +instance TryConnectionManager Sqlite where+ tryWithConn f g conn@(Sqlite c _) = do+ liftIO $ S.exec c "BEGIN"+ x <- g (f conn)+ case x of+ Left _ -> liftIO $ S.exec c "ROLLBACK"+ Right _ -> liftIO $ S.exec c "COMMIT"+ return x+ instance ExtractConnection Sqlite Sqlite where extractConn f conn = f conn
changelog view
@@ -1,3 +1,6 @@+0.8.0.1+* New typeclass to allow transaction rollback through ExceptT+ 0.8 * Support for GHC 8
groundhog-sqlite.cabal view
@@ -1,5 +1,5 @@ name: groundhog-sqlite-version: 0.8+version: 0.8.0.1 license: BSD3 license-file: LICENSE author: Boris Lykah <lykahb@gmail.com>@@ -18,7 +18,7 @@ build-depends: base >= 4 && < 5 , bytestring >= 0.9 , transformers >= 0.2.1- , groundhog >= 0.8 && < 0.9+ , groundhog >= 0.8.0.1 && < 0.9 , monad-control >= 0.3 && < 1.1 , containers >= 0.2 , text >= 0.8