Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use withTransaction'

  • Loading branch information...
commit 936e235260c22c11bf952711e2634548b02c1f99 1 parent 195cb79
@norm2782 authored
Showing with 14 additions and 14 deletions.
  1. +14 −14 src/Snap/Snaplet/Hdbc.hs
View
28 src/Snap/Snaplet/Hdbc.hs
@@ -17,23 +17,23 @@ module Snap.Snaplet.Hdbc (
, query'
-- Snapletified HDBC functions
- , disconnect
- , commit
- , rollback
- , runRaw
- , run
- , prepare
, clone
- , hdbcDriverName
- , hdbcClientVer
- , proxiedClientVer
- , proxiedClientName
+ , commit
, dbServerVer
, dbTransactionSupport
- , getTables
, describeTable
- , quickQuery'
+ , disconnect
+ , getTables
+ , hdbcClientVer
+ , hdbcDriverName
+ , prepare
+ , proxiedClientName
+ , proxiedClientVer
, quickQuery
+ , quickQuery'
+ , rollback
+ , run
+ , runRaw
, sRun
, withHdbc
, withHdbc'
@@ -121,8 +121,8 @@ query sql bind = do
liftIO $ HDBC.fetchAllRowsMap stmt
query' :: HasHdbc m conn => String -> [SqlValue] -> m Integer
-query' sql bind = withTransaction $ \conn -> do
- stmt <- HDBC.prepare conn sql
+query' sql bind = withTransaction' $ do
+ stmt <- prepare sql
liftIO $ HDBC.execute stmt bind
withTransaction :: HasHdbc m c => (c -> IO a) -> m a
Please sign in to comment.
Something went wrong with that request. Please try again.