hasql-transaction 0.9 → 0.9.1
raw patch · 2 files changed
+11/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Hasql.Transaction: restrict :: Level -> Transaction a -> Transaction a
Files
- hasql-transaction.cabal +1/−1
- library/Hasql/Transaction.hs +10/−0
hasql-transaction.cabal view
@@ -1,5 +1,5 @@ name: hasql-transaction-version: 0.9+version: 0.9.1 category: Hasql, Database, PostgreSQL synopsis: Composable abstraction over retryable transactions for Hasql homepage: https://github.com/nikita-volkov/hasql-transaction
library/Hasql/Transaction.hs view
@@ -11,6 +11,7 @@ sql, session, condemn,+ restrict, {-* Settings -} Mode(..), Level(..),@@ -139,3 +140,12 @@ -} condemn :: Transaction () condemn = Transaction minBound minBound [put Condemned]++{-|+Restrict the transaction isolation level.++Will pick up the strictest level among the one you've specified and+the one associated with the updated transaction.+-}+restrict :: Level -> Transaction a -> Transaction a+restrict newLevel (Transaction mode oldLevel sessions) = Transaction mode (max newLevel oldLevel) sessions