@@ -6,7 +6,7 @@ Maintainer: eitan@morphism.tech
66Stability: experimental
77
88This module is where Squeal commands actually get executed by
9−`LibPQ`. It containts two typeclasses, `IndexedMonadTransPQ` for executing
9+`Database.PostgreSQL.LibPQ`. It containts two typeclasses, `IndexedMonadTransPQ` for executing
1010a `Definition` and `MonadPQ` for executing a `Manipulation` or `Query`,
1111and a `PQ` type with instances for them.
1212
@@ -172,7 +172,7 @@ instance Monad m => Functor (PQ schemas0 schemas1 m) where
172172 K x <- pq conn
173173 return $ K (f x)
174174
175−-- | Run a `PQ` and keep the result and the `Connection`.
175+-- | Run a `PQ` and keep the result and the `LibPQ.Connection`.
176176runPQ
177177 :: Functor m
178178 => PQ schemas0 schemas1 m x
@@ -182,7 +182,7 @@ runPQ (PQ pq) conn = (\ x -> (unK x, K (unK conn))) <$> pq conn
182182 -- K x <- pq conn
183183 -- return (x, K (unK conn))
184184
185−-- | Execute a `PQ` and discard the result but keep the `Connection`.
185+-- | Execute a `PQ` and discard the result but keep the `LibPQ.Connection`.
186186execPQ
187187 :: Functor m
188188 => PQ schemas0 schemas1 m x
@@ -190,7 +190,7 @@ execPQ
190190 -> m (K LibPQ.Connection schemas1)
191191execPQ (PQ pq) conn = mapKK (\ _ -> unK conn) <$> pq conn
192192
193−-- | Evaluate a `PQ` and discard the `Connection` but keep the result.
193+-- | Evaluate a `PQ` and discard the `LibPQ.Connection` but keep the result.
194194evalPQ
195195 :: Functor m
196196 => PQ schemas0 schemas1 m x
@@ -279,8 +279,8 @@ instance IndexedMonadTransPQ PQ where
279279 "define: LibPQ.exec returned no results"
280280 Just result -> return $ K (K result)
281281
282−{- | `MonadPQ` is an `mtl` style constraint, similar to
283−`Control.Monad.State.Class.MonadState`, for using `LibPQ` to
282+{- | `MonadPQ` is an @mtl@ style constraint, similar to
283+`Control.Monad.State.Class.MonadState`, for using `Database.PostgreSQL.LibPQ` to
284284
285285* `manipulateParams` runs a `Manipulation` with params from a type
286286 with a `ToParams` constraint. It calls `LibPQ.execParams` and
@@ -305,7 +305,7 @@ instance IndexedMonadTransPQ PQ where
305305
306306* `forPrepared_` is a flipped `traversePrepared_`.
307307
308−* `liftPQ` lets you lift actions from `LibPQ` that require a connection
308+* `liftPQ` lets you lift actions from `Database.PostgreSQL.LibPQ` that require a connection
309309 into your monad.
310310
311311To define an instance, you can minimally define only `manipulateParams`,
@@ -317,13 +317,13 @@ class Monad pq => MonadPQ schemas pq | pq -> schemas where
317317 manipulateParams
318318 :: ToParams x params
319319 => Manipulation '[] schemas params ys
320− -- ^ `insertRows`, `update` or `deleteFrom`
320+ -- ^ `insertInto`, `update` or `deleteFrom`
321321 -> x -> pq (K LibPQ.Result ys)
322322 default manipulateParams
323323 :: (MonadTrans t, MonadPQ schemas pq1, pq ~ t pq1)
324324 => ToParams x params
325325 => Manipulation '[] schemas params ys
326− -- ^ `insertRows`, `update` or `deleteFrom`
326+ -- ^ `insertInto`, `update` or `deleteFrom`
327327 -> x -> pq (K LibPQ.Result ys)
328328 manipulateParams manipulation params = lift $
329329 manipulateParams manipulation params
@@ -347,7 +347,7 @@ class Monad pq => MonadPQ schemas pq | pq -> schemas where
347347 traversePrepared
348348 :: (ToParams x params, Traversable list)
349349 => Manipulation '[] schemas params ys
350− -- ^ `insertRows`, `update`, or `deleteFrom`, and friends
350+ -- ^ `insertInto`, `update`, or `deleteFrom`, and friends
351351 -> list x -> pq (list (K LibPQ.Result ys))
352352 default traversePrepared
353353 :: (MonadTrans t, MonadPQ schemas pq1, pq ~ t pq1)
@@ -360,20 +360,20 @@ class Monad pq => MonadPQ schemas pq | pq -> schemas where
360360 :: (ToParams x params, Traversable list)
361361 => list x
362362 -> Manipulation '[] schemas params ys
363− -- ^ `insertRows`, `update` or `deleteFrom`
363+ -- ^ `insertInto`, `update` or `deleteFrom`
364364 -> pq (list (K LibPQ.Result ys))
365365 forPrepared = flip traversePrepared
366366
367367 traversePrepared_
368368 :: (ToParams x params, Foldable list)
369369 => Manipulation '[] schemas params '[]
370− -- ^ `insertRows`, `update` or `deleteFrom`
370+ -- ^ `insertInto`, `update` or `deleteFrom`
371371 -> list x -> pq ()
372372 default traversePrepared_
373373 :: (MonadTrans t, MonadPQ schemas pq1, pq ~ t pq1)
374374 => (ToParams x params, Foldable list)
375375 => Manipulation '[] schemas params '[]
376− -- ^ `insertRows`, `update` or `deleteFrom`
376+ -- ^ `insertInto`, `update` or `deleteFrom`
377377 -> list x -> pq ()
378378 traversePrepared_ manipulation params = lift $
379379 traversePrepared_ manipulation params
@@ -382,7 +382,7 @@ class Monad pq => MonadPQ schemas pq | pq -> schemas where
382382 :: (ToParams x params, Foldable list)
383383 => list x
384384 -> Manipulation '[] schemas params '[]
385− -- ^ `insertRows`, `update` or `deleteFrom`
385+ -- ^ `insertInto`, `update` or `deleteFrom`
386386 -> pq ()
387387 forPrepared_ = flip traversePrepared_
388388