Permalink
Browse files

Bump snap reqs

  • Loading branch information...
1 parent b9a11c4 commit e5cffc045eda89bb448a13d104ab7ebea74da405 @norm2782 committed Dec 9, 2011
Showing with 6 additions and 5 deletions.
  1. +2 −2 snaplet-hdbc.cabal
  2. +4 −3 src/Snap/Snaplet/Hdbc.hs
View
@@ -1,5 +1,5 @@
name: snaplet-hdbc
-version: 0.6.4
+version: 0.7
synopsis: HDBC snaplet for Snap Framework
description: This snaplet consists of two parts: an HDBC abstraction snaplet
and an HDBC authentication backend for Snap's authentication
@@ -39,7 +39,7 @@ Library
mtl > 2.0 && < 2.1,
monad-control >= 0.2 && < 0.3,
resource-pool >= 0.2 && < 0.3,
- snap >= 0.6 && < 0.7,
+ snap >= 0.6 && < 0.8,
text >= 0.11 && < 0.12,
time >= 1.1 && < 1.5,
unordered-containers >= 0.1.4 && < 0.2
View
@@ -153,6 +153,7 @@ query sql bind = do
-- | Similar to 'query', but instead of returning a list of 'Row's, it returns
-- an 'Integer' indicating the numbers of affected rows. This is typically used
-- for @INSERT@, @UPDATE@ and @DELETE@ queries.
+-- TODO: Revert to the implementation below once withTransaction' works as expected.
query' :: HasHdbc m c s => String -> [SqlValue] -> m Integer
query' sql bind = withTransaction $ \conn -> do
stmt <- HDBC.prepare conn sql
@@ -184,9 +185,9 @@ withTransaction' action = do
r <- action `onException` doRollback
commit
return r
- where doRollback = catch rollback doRollbackHandler
- doRollbackHandler :: MonadControlIO m => SomeException -> m ()
- doRollbackHandler _ = return ()
+ where doRollback = rollback `catch` doRollbackHandler
+ doRollbackHandler :: MonadControlIO m => SomeException -> m ()
+ doRollbackHandler _ = return ()
-- | The functions provided below are wrappers around the original HDBC
-- functions. Please refer to the HDBC documentation to see what they do and

0 comments on commit e5cffc0

Please sign in to comment.