on dev help sign in
pool doc stuff
409e045Eitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Pool.hs+10−5
@@ -42,17 +42,22 @@ import Generics.SOP (K(..))
42import Squeal.PostgreSQL.PQ
42import Squeal.PostgreSQL.PQ
43import Squeal.PostgreSQL.Schema
43import Squeal.PostgreSQL.Schema
44
44
45−-- | `PoolPQ` @schema@ should be a drop-in replacement for
45+-- | `PoolPQ` @schema@ should be a drop-in replacement for `PQ` @schema schema@.
46−-- `PQ schema schema`.
47newtype PoolPQ (schema :: TablesType) m x =
46newtype PoolPQ (schema :: TablesType) m x =
48 PoolPQ { runPoolPQ :: Pool (K Connection schema) -> m x }
47 PoolPQ { runPoolPQ :: Pool (K Connection schema) -> m x }
49 deriving Functor
48 deriving Functor
50
49
50+-- | Create a striped pool of connections.
51+-- Although the garbage collector will destroy all idle connections when the pool is garbage collected it's recommended to manually destroyAllResources when you're done with the pool so that the connections are freed up as soon as possible.
51createConnectionPool
52createConnectionPool
52− -- ^ Create a striped pool of connections.
53− -- Although the garbage collector will destroy all idle connections when the pool is garbage collected it's recommended to manually destroyAllResources when you're done with the pool so that the connections are freed up as soon as possible.
54 :: MonadBase IO io
53 :: MonadBase IO io
55− => ByteString -- ^ conninfo
54+ => ByteString
55+ -- ^ The passed string can be empty to use all default parameters, or it can
56+ -- contain one or more parameter settings separated by whitespace.
57+ -- Each parameter setting is in the form keyword = value. Spaces around the equal
58+ -- sign are optional. To write an empty value or a value containing spaces,
59+ -- surround it with single quotes, e.g., keyword = 'a value'. Single quotes and
60+ -- backslashes within the value must be escaped with a backslash, i.e., ' and \.
56 -> Int
61 -> Int
57 -- ^ The number of stripes (distinct sub-pools) to maintain. The smallest acceptable value is 1.
62 -- ^ The number of stripes (distinct sub-pools) to maintain. The smallest acceptable value is 1.
58 -> NominalDiffTime
63 -> NominalDiffTime