effectful-postgresql
Safe HaskellNone
LanguageHaskell2010

Effectful.PostgreSQL.Connection.Pool

Synopsis

Interpret with a Connection pool

runWithConnectionPool :: forall (es :: [Effect]) a. (HasCallStack, IOE :> es) => Pool Connection -> Eff (WithConnection ': es) a -> Eff es a Source #

Rather than keeping one connection alive and re-using it for the whole process, we might want to create a Pool of connections and only "ask" for one when we need it. This function uses UnliftIO.Pool to do just that.

Re-export