Postgres.pool.clean: def of bend-kit-postgres@0.3.0.0 Import: import bend-kit-postgres@0.3.0.0/postgres.bend as Postgres Lines 645-654 of bend-kit-postgres@0.3.0.0/postgres.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-postgres@0.3.0.0/postgres.bend&start_line=645&end_line=654 import Base def pool.clean(clean: Bool, p: Pool, c: Conn) -> IO(Pool): match clean: case True{}: Pool{+cap, idle} = p Conn{tls, sock, rd, +k, ms, status} = c pool.keep(cap, k, Conn{tls, sock, rd, k, ms, status}, Map.pop(&1, List<&1, Conn>, idle, k)) case False{}: do IO: close(c) return p Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Map.pop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/postgres.bend&name=Conn https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/postgres.bend&name=Pool https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/postgres.bend&name=close https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/postgres.bend&name=pool.keep