Postgres.query: def of bend-kit-postgres@0.3.1.0 Import: import bend-kit-postgres@0.3.1.0/postgres.bend as Postgres Lines 570-577 of bend-kit-postgres@0.3.1.0/postgres.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&start_line=570&end_line=577 import Base import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes import bend-kit-postgres@0.3.1.0/codec.bend as Codec # Runs sql (a byte string, parameters as $1, $2, ...) as an unnamed prepared statement: # Parse, Bind, Describe, Execute, Sync. Parameters and results are in text format; None is NULL. # A server error is a Failed reply on a live connection; a Failure has closed it. def query(c: Conn, +sql: String, params: List<&1, Maybe<&1, Bytes.Bytes>>) -> IO(Result<&1, &1, Failure, Conn & Reply>): do IO>: s : Result<&1, &1, Failure, Conn> <- send(c, query.bytes(sql, params)) m : Result<&1, &1, Failure, Conn & Codec.Back> <- reply(s) collect(Nat.mul(65536n, 65536n), absorbed(Acc{Nil{}, Nil{}, Bytes.new(0), None{}}, m)) Uses (20): 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-bytes@0.3.3.0/bytes.bend&name=new https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/codec.bend&name=Back https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=Acc https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=Conn https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=Failure https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=Reply https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=absorbed https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=collect https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=query.bytes https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=reply https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.1.0/postgres.bend&name=send