@@ -52,7 +52,7 @@ import Squeal.PostgreSQL.Schema
53-- | Run a schema invariant computation `transactionally`.
53-- | Run a schema invariant computation `transactionally`.
54transactionally
54transactionally
55− :: (MonadBaseControl IO tx, MonadPQ schema tx)
55+ :: (MonadBaseControl IO tx, MonadPQ db tx)
56 => TransactionMode
56 => TransactionMode
57 -> tx x -- ^ run inside a transaction
57 -> tx x -- ^ run inside a transaction
@@ -64,30 +64,30 @@ transactionally mode tx = mask $ \restore -> do
65-- | Run a schema invariant computation `transactionally_` in `defaultMode`.
65-- | Run a schema invariant computation `transactionally_` in `defaultMode`.
66transactionally_
66transactionally_
67− :: (MonadBaseControl IO tx, MonadPQ schema tx)
67+ :: (MonadBaseControl IO tx, MonadPQ db tx)
68 => tx x -- ^ run inside a transaction
68 => tx x -- ^ run inside a transaction
70transactionally_ = transactionally defaultMode
70transactionally_ = transactionally defaultMode
72-- | @BEGIN@ a transaction.
72-- | @BEGIN@ a transaction.
73−begin :: MonadPQ schema tx => TransactionMode -> tx (K Result ('[] :: RowType))
73+begin :: MonadPQ db tx => TransactionMode -> tx (K Result ('[] :: RowType))
74begin mode = manipulate . UnsafeManipulation $
74begin mode = manipulate . UnsafeManipulation $
75 "BEGIN" <+> renderTransactionMode mode <> ";"
75 "BEGIN" <+> renderTransactionMode mode <> ";"
77-- | @COMMIT@ a schema invariant transaction.
77-- | @COMMIT@ a schema invariant transaction.
78−commit :: MonadPQ schema tx => tx (K Result ('[] :: RowType))
78+commit :: MonadPQ db tx => tx (K Result ('[] :: RowType))
79commit = manipulate $ UnsafeManipulation "COMMIT;"
79commit = manipulate $ UnsafeManipulation "COMMIT;"
81-- | @ROLLBACK@ a schema invariant transaction.
81-- | @ROLLBACK@ a schema invariant transaction.
82−rollback :: MonadPQ schema tx => tx (K Result ('[] :: RowType))
82+rollback :: MonadPQ db tx => tx (K Result ('[] :: RowType))
83rollback = manipulate $ UnsafeManipulation "ROLLBACK;"
83rollback = manipulate $ UnsafeManipulation "ROLLBACK;"
85-- | Run a schema changing computation `transactionallySchema`.
85-- | Run a schema changing computation `transactionallySchema`.
86transactionallySchema
86transactionallySchema
87 :: MonadBaseControl IO io
87 :: MonadBaseControl IO io
88 => TransactionMode
88 => TransactionMode
89− -> PQ schema0 schema1 io x
89+ -> PQ db0 db1 io x
90− -> PQ schema0 schema1 io x
90+ -> PQ db0 db1 io x
91transactionallySchema mode u = PQ $ \ conn -> mask $ \ restore -> do
91transactionallySchema mode u = PQ $ \ conn -> mask $ \ restore -> do
92 _ <- liftBase . LibPQ.exec (unK conn) $
92 _ <- liftBase . LibPQ.exec (unK conn) $
93 "BEGIN" <+> renderTransactionMode mode <> ";"
93 "BEGIN" <+> renderTransactionMode mode <> ";"
@@ -99,8 +99,8 @@ transactionallySchema mode u = PQ $ \ conn -> mask $ \ restore -> do
99-- | Run a schema changing computation `transactionallySchema_` in `DefaultMode`.
99-- | Run a schema changing computation `transactionallySchema_` in `DefaultMode`.
100transactionallySchema_
100transactionallySchema_
101 :: MonadBaseControl IO io
101 :: MonadBaseControl IO io
102− => PQ schema0 schema1 io x
102+ => PQ db0 db1 io x
103− -> PQ schema0 schema1 io x
103+ -> PQ db0 db1 io x
104transactionallySchema_ = transactionallySchema defaultMode
104transactionallySchema_ = transactionallySchema defaultMode
106-- | The available transaction characteristics are the transaction `IsolationLevel`,
106-- | The available transaction characteristics are the transaction `IsolationLevel`,