@@ -41,7 +41,28 @@ import Generics.SOP (K(..))
4141import Squeal.PostgreSQL.PQ
4242import Squeal.PostgreSQL.Schema
4343
44−-- | `PoolPQ` @schema@ should be a drop-in replacement for `PQ` @schema schema@.
44+{- | `PoolPQ` @schema@ should be a drop-in replacement for `PQ` @schema schema@.
45+
46+Typical use case would be to create your pool using `createConnectionPool` and run anything that requires the pool connection with it.
47+
48+Here's a simplified example:
49+
50+> type Schema = '[ "tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'NotNull 'PGint2])]
51+>
52+> someQuery :: Manipulation Schema '[ 'NotNull 'PGint2] '[]
53+> someQuery = insertRow #tab
54+> (Set (param @1) `As` #col :* Nil)
55+> OnConflictDoNothing (Returning Nil)
56+>
57+> insertOne :: (MonadBaseControl IO m, MonadPQ Schema m) => m ()
58+> insertOne = void $ manipulateParams someQuery . Only $ (1 :: Int16)
59+>
60+> insertOneInPool :: ByteString -> IO ()
61+> insertOneInPool connectionString = do
62+> pool <- createConnectionPool connectionString 1 0.5 10
63+> liftIO $ runPoolPQ (insertOne) pool
64+
65+-}
4566newtype PoolPQ (schema :: SchemaType) m x =
4667 PoolPQ { runPoolPQ :: Pool (K Connection schema) -> m x }
4768 deriving Functor