on dev help sign in
pool docs
commit9f2c323acc2c8db60788e558dc6706f99f38b529 authorEitan Chatav <eitan.chatav@gmail.com> dateSat 17 Mar 2018, 16:32 (9 years ago) parent380dd16
2 files changed+12−1
squeal-postgresql/src/Squeal/PostgreSQL/PQ.hs−1 squeal-postgresql/src/Squeal/PostgreSQL/Pool.hs+12
squeal-postgresql/src/Squeal/PostgreSQL/PQ.hs−1
@@ -146,7 +146,6 @@ withConnection
146146 :: forall schema0 schema1 io x
147147 . MonadBaseControl IO io
148148 => ByteString
149− -- -> (K LibPQ.Connection schema0 -> io (x, K LibPQ.Connection schema1))
150149 -> PQ schema0 schema1 io x
151150 -> io x
152151withConnection connString action = do
squeal-postgresql/src/Squeal/PostgreSQL/Pool.hs+12
@@ -1,3 +1,13 @@
1+{-|
2+Module: Squeal.PostgreSQL.Definition
3+Description: Pooled connections
4+Copyright: (c) Eitan Chatav, 2017
5+Maintainer: eitan@morphism.tech
6+Stability: experimental
7+
8+A `MonadPQ` for pooled connections.
9+-}
10+
111{-# LANGUAGE
212 DataKinds
313 , DeriveFunctor
@@ -22,6 +32,8 @@ import Generics.SOP (K(..))
2232import Squeal.PostgreSQL.PQ
2333import Squeal.PostgreSQL.Schema
2434
35+-- | `PoolPQ` @schema@ should be a drop-in replacement for
36+-- `PQ schema schema`.
2537newtype PoolPQ (schema :: TablesType) m x =
2638 PoolPQ { runPoolPQ :: Pool (K Connection schema) -> m x }
2739 deriving Functor