-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Bracketed connection for HDBC
--   
--   This package contains a base bracketed function to call close
--   correctly against opend DB connection.
@package HDBC-session
@version 0.1.2.1

-- | This module provides a base bracketed function to call close correctly
--   against opend DB connection.
module Database.HDBC.Session

-- | Run a transaction on a HDBC IConnection and commit at last, and
--   then close the connection. In other words, the transaction with no
--   exception is committed. Handy definition for simple transactions.
transaction :: IConnection conn => IO conn -> (conn -> IO a) -> IO a

-- | Run a transaction on a HDBC IConnection and close the
--   connection. Not issuing commit at last, so if you need, issue commit
--   manually in transaction body.
withConnectionIO :: IConnection conn => IO conn -> (conn -> IO a) -> IO a

-- | Same as withConnectionIO other than not wrapping transaction
--   body in handleSqlError'.
withConnectionIO_ :: IConnection conn => IO conn -> (conn -> IO a) -> IO a

-- | Generalized session with bracketed HDBC connection. Run a transaction
--   on a HDBC IConnection and close the connection.
bracketConnection :: (Monad m, IConnection conn) => (forall c. () => m c -> (c -> m ()) -> (c -> m a) -> m a) -> (forall b. () => IO b -> m b) -> IO conn -> (conn -> m a) -> m a

-- | show SqlError not to show String fields.
showSqlError :: SqlError -> String

-- | Like handleSqlError, but not to show String fields of
--   SqlError.
handleSqlError' :: IO a -> IO a

-- | Deprecated. use bracketConnection instead of this.

-- | Deprecated: use bracketConnection instead of this.
withConnection :: (Monad m, IConnection conn) => (forall c. () => m c -> (c -> m ()) -> (c -> m a) -> m a) -> (forall b. () => IO b -> m b) -> IO conn -> (conn -> m a) -> m a

-- | Deprecated. use withConnectionIO instead of this.

-- | Deprecated: use withConnectionIO instead of this.
withConnectionIO' :: IConnection conn => IO conn -> (conn -> IO a) -> IO a

-- | Deprecated. use transaction instead of this.

-- | Deprecated: use transaction instead of this.
withConnectionCommit :: IConnection conn => IO conn -> (conn -> IO a) -> IO a
