def pool.got

bend-kit-postgres@0.3.0.0 · postgres.bend:606

import bend-kit-postgres@0.3.0.0/postgres.bend as Postgres
import Base

606def pool.got(cfg: Config, r: Pool & Maybe<&1, Conn>) -> IO(Pool & Result<&1, &1, Failure, Conn>):
607  (p, m) = r
608  match m:
609    case Some{c}:
610      IO.pure(Pool & Result<&1, &1, Failure, Conn>, (p, Done{c}))
611    case None{}:
612      do IO<Pool & Result<&1, &1, Failure, Conn>>:
613        c : Result<&1, &1, Failure, Conn> <- connect(cfg)
614        pool.opened(p, c)

Uses (13)

Used by (1)