Safe Haskell | None |
---|---|
Language | Haskell2010 |
Effectful.PostgreSQL.Connection.Pool
Synopsis
- runWithConnectionPool :: forall (es :: [Effect]) a. (HasCallStack, IOE :> es) => Pool Connection -> Eff (WithConnection ': es) a -> Eff es a
- module UnliftIO.Pool
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
module UnliftIO.Pool