git.iko.soy/typeable/postgresql-simple
on master help sign in
Remove some commented-out mysql-simple code
commite0d3346268d0f1eef1fd2969eb3972c194ab666d authorLeon P Smith <leon@melding-monads.com> dateTue 3 Jan 2012, 16:22 (15 years ago) parentbce0d38
1 file changed−20
src/Database/PostgreSQL/Simple.hs−20
src/Database/PostgreSQL/Simple.hs−20
@@ -443,26 +443,6 @@ finishFold conn c q a_ f = loop a_
443443 Nothing -> return ()
444444 Just _ -> clear c
445445
446−
447−
448−{--
449−finishFold :: (QueryResults r) =>
450− Connection -> Query -> a -> (a -> r -> IO a) -> IO a
451−finishFold conn q z0 f = withResult (Base.useResult conn) q $ \r fs ->
452− flip fix z0 $ \loop z -> do
453− row <- Base.fetchRow r
454− case row of
455− [] -> return z
456− _ -> (f z $! convertResults fs row) >>= loop
457−--}
458−{--
459−withResult :: (IO Result) -> Query -> (Result -> [Field] -> IO a) -> IO a
460−withResult fetchResult q act = bracket fetchResult Base.freeResult $ \r -> do
461− ncols <- Base.fieldCount (Right r)
462− if ncols == 0
463− then throwIO $ QueryError "query resulted in zero-column result" q
464− else act r =<< Base.fetchFields r
465−--}
466446-- | Execute an action inside a SQL transaction.
467447--
468448-- This function initiates a transaction with a \"@begin