Hello community,

here is the log from the commit of package ghc-HDBC-session for 
openSUSE:Factory checked in at 2016-10-22 13:23:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-HDBC-session (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-HDBC-session.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-HDBC-session"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-HDBC-session/ghc-HDBC-session.changes        
2016-10-14 09:05:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-HDBC-session.new/ghc-HDBC-session.changes   
2016-10-22 13:23:32.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 15 06:48:30 UTC 2016 - [email protected]
+
+- Update to version 0.1.1.0 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  HDBC-session-0.1.0.1.tar.gz

New:
----
  HDBC-session-0.1.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-HDBC-session.spec ++++++
--- /var/tmp/diff_new_pack.JFRyQs/_old  2016-10-22 13:23:34.000000000 +0200
+++ /var/tmp/diff_new_pack.JFRyQs/_new  2016-10-22 13:23:34.000000000 +0200
@@ -18,19 +18,17 @@
 
 %global pkg_name HDBC-session
 Name:           ghc-%{pkg_name}
-Version:        0.1.0.1
+Version:        0.1.1.0
 Release:        0
 Summary:        Bracketed connection for HDBC
 License:        BSD-3-Clause
-Group:          System/Libraries
+Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-HDBC-devel
 BuildRequires:  ghc-rpm-macros
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-# End cabal-rpm deps
 
 %description
 This package contains a base bracketed function to call close correctly against
@@ -50,15 +48,12 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %post devel
 %ghc_pkg_recache
 

++++++ HDBC-session-0.1.0.1.tar.gz -> HDBC-session-0.1.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HDBC-session-0.1.0.1/HDBC-session.cabal 
new/HDBC-session-0.1.1.0/HDBC-session.cabal
--- old/HDBC-session-0.1.0.1/HDBC-session.cabal 2016-06-19 08:02:46.000000000 
+0200
+++ new/HDBC-session-0.1.1.0/HDBC-session.cabal 2016-09-09 08:21:41.000000000 
+0200
@@ -1,5 +1,5 @@
 name:                HDBC-session
-version:             0.1.0.1
+version:             0.1.1.0
 synopsis:            Bracketed connection for HDBC
 description:         This package contains a base bracketed function
                      to call close correctly against opend DB connection.
@@ -8,7 +8,7 @@
 license-file:        LICENSE
 author:              Kei Hibino
 maintainer:          [email protected]
-copyright:           Copyright (c) 2013-2014 Kei Hibino
+copyright:           Copyright (c) 2013-2016 Kei Hibino
 category:            Database
 build-type:          Simple
 cabal-version:       >=1.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/HDBC-session-0.1.0.1/src/Database/HDBC/Session.hs 
new/HDBC-session-0.1.1.0/src/Database/HDBC/Session.hs
--- old/HDBC-session-0.1.0.1/src/Database/HDBC/Session.hs       2016-06-19 
08:02:46.000000000 +0200
+++ new/HDBC-session-0.1.1.0/src/Database/HDBC/Session.hs       2016-09-09 
08:21:41.000000000 +0200
@@ -2,7 +2,7 @@
 
 -- |
 -- Module      : Database.HDBC.Session
--- Copyright   : 2013 Kei Hibino
+-- Copyright   : 2013-2016 Kei Hibino
 -- License     : BSD3
 --
 -- Maintainer  : [email protected]
@@ -14,7 +14,10 @@
 module Database.HDBC.Session (
   -- * Bracketed session
   -- $bracketedSession
-  withConnection, withConnectionIO, withConnectionIO',
+  withConnectionCommit,
+  withConnectionIO, withConnectionIO',
+
+  withConnection,
 
   -- * Show errors
   -- $showErrors
@@ -77,6 +80,19 @@
                  -> IO a           -- ^ Result transaction action
 withConnectionIO =  withConnection bracket id
 
+-- | Same as 'withConnectionIO' other than issuing commit at the end of 
transaction body.
+--   In other words, the transaction with no exception is committed.
+--   Handy defintion for simple transactions.
+withConnectionCommit :: IConnection conn
+                     => IO conn        -- ^ Connect action
+                     -> (conn -> IO a) -- ^ Transaction body
+                     -> IO a           -- ^ Result transaction action
+withConnectionCommit conn body =
+  withConnectionIO conn $ \c -> do
+    x <- body c
+    HDBC.commit c
+    return x
+
 -- | Same as 'withConnectionIO' other than wrapping transaction body in 
'handleSqlError''.
 withConnectionIO' :: IConnection conn
                   => IO conn        -- ^ Connect action


Reply via email to