git.iko.soy/typeable/postgresql-simple
on master help sign in
Export +withTransactionModeRetry', style changes
commit22b3bb48f2e40eb7bda1474e33e82dd992452af1 authorOleg Grenrus <oleg.grenrus@iki.fi> dateSun 15 Nov 2020, 20:27 (6 years ago) parent9b24481
2 files changed+9−1
CHANGES.md+7 src/Database/PostgreSQL/Simple/Transaction.hs+2−1
CHANGES.md+7
@@ -9,6 +9,13 @@
99 * Add `Identity` and `Const` instance
1010 Thanks to Cary Robbins for the implementation
1111 https://github.com/haskellari/postgresql-simple/pull/46
12+ * Add `withTransactionModeRetry'`, a variant of `withTransactionModeRetry`
13+ for all exception types.
14+ Thanks to Elliot Cameron for the implementation
15+ https://github.com/haskellari/postgresql-simple/pull/42
16+ * Fix spurious aborts when retrying transactions
17+ Thanks to Elliot Cameron for the implementation
18+ https://github.com/haskellari/postgresql-simple/pull/34
1219
1320### Version 0.6.2 (2019-04-26)
1421
src/Database/PostgreSQL/Simple/Transaction.hs+2−1
@@ -17,6 +17,7 @@ module Database.PostgreSQL.Simple.Transaction
1717 , withTransactionLevel
1818 , withTransactionMode
1919 , withTransactionModeRetry
20+ , withTransactionModeRetry'
2021 , withTransactionSerializable
2122 , TransactionMode(..)
2223 , IsolationLevel(..)
@@ -147,7 +148,7 @@ withTransactionMode mode conn act =
147148 return r
148149
149150-- | 'withTransactionModeRetry'' but with the exception type pinned to 'SqlError'.
150−withTransactionModeRetry :: forall a. TransactionMode -> (SqlError -> Bool) -> Connection -> IO a -> IO a
151+withTransactionModeRetry :: TransactionMode -> (SqlError -> Bool) -> Connection -> IO a -> IO a
151152withTransactionModeRetry = withTransactionModeRetry'
152153
153154-- | Like 'withTransactionMode', but also takes a custom callback to