bend-kit-postgres
Releases (6):
0.3.0.0 0xe72feeb9a371f3cb7046962c7f395d75 indexed https://jend.leeeet.dev/files.txt?path=bend-kit-postgres@0.3.0.0
0.2.0.1 0x0929b94b20c41e41522475b356a77634 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-postgres@0.2.0.1
0.2.0.0 0x8be265cb751a2e29c230d8b2ec106bea unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-postgres@0.2.0.0
0.1.0.2 0xf63ce82892c02964729ebb2a79be513f unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-postgres@0.1.0.2
0.1.0.1 0x93d94e676e81df7c0c1a0e8f66ffa209 unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-postgres@0.1.0.1
0.1.0.0 0x4a157af9bb54efff1723341b7254fc4a unindexed https://jend.leeeet.dev/files.txt?path=bend-kit-postgres@0.1.0.0
Definitions (255, 1 to 100 shown):
Codec.Param (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Param)
# A StartupMessage parameter, such as ("user", name) or ("database", db).
type Param is Type:
Param{name: Bytes.Bytes, value: Bytes.Bytes}
Codec.Front (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Front)
# Frontend messages. Describe and CloseMsg take kind 83 ('S', statement) or 80 ('P', portal).
# Bind params hold one Maybe per parameter, None for SQL NULL; empty formats mean text.
type Front is Type:
Startup{params: List<&1, Param>}
SSLRequest{}
Password{text: Bytes.Bytes}
SASLInitial{mech: Bytes.Bytes, data: Bytes.Bytes}
SASLResponse{data: Bytes.Bytes}
Parse{name: Bytes.Bytes, query: Bytes.Bytes, oids: List<&2, U32>}
Bind{portal: Bytes.Bytes, stmt: Bytes.Bytes, formats: List<&2, U32>, params: List<&1, Maybe<&1, Bytes.Bytes>>, results: List<&2, U32>}
Describe{kind: U32, name: Bytes.Bytes}
…
Codec.Field (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Field)
# A RowDescription column. size and modifier are the raw int16 and int32 words.
type Field is Type:
Field{name: Bytes.Bytes, table: U32, column: U32, oid: U32, size: U32, modifier: U32, format: U32}
Codec.Notice (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Notice)
# An ErrorResponse or NoticeResponse field: code is its type byte, such as 67 ('C', SQLSTATE) or 77 ('M', message).
type Notice is Type:
Notice{code: U32, value: Bytes.Bytes}
Codec.Back (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Back)
# Backend messages. AuthOther holds any other authentication code (MD5 is 5) and its payload.
# ReadyForQuery status is 73 ('I'), 84 ('T') or 69 ('E'). Other holds a well-framed message of any other tag.
type Back is Type:
AuthOk{}
AuthCleartext{}
AuthSASL{mechs: List<&1, Bytes.Bytes>}
AuthSASLContinue{data: Bytes.Bytes}
AuthSASLFinal{data: Bytes.Bytes}
AuthOther{code: U32, data: Bytes.Bytes}
ParameterStatus{name: Bytes.Bytes, value: Bytes.Bytes}
BackendKeyData{pid: U32, key: U32}
…
Codec.notice.get (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notice.get)
# The first field whose code is code.
def notice.get(+code: U32, fs: List<&1, Notice>) -> Maybe<&1, Bytes.Bytes>:
Codec.byte1 (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=byte1)
def byte1(+c: U32) -> Bytes.Bytes:
Codec.be16 (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=be16)
def be16(+v: U32) -> Bytes.Bytes:
Codec.be32 (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=be32)
def be32(+v: U32) -> Bytes.Bytes:
Codec.cstr.enc (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=cstr.enc)
# ponytail: a NUL inside a cstr field ends it early; the message length still frames it, so the server rejects that message only.
def cstr.enc(b: Bytes.Bytes) -> Bytes.Bytes:
Codec.frame.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=frame.of)
def frame.of(+tag: U32, r: Bytes.Bytes & U32) -> Bytes.Bytes:
Codec.frame (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=frame)
# A tagged message: the tag byte, the int32 length (counting itself), then the body.
def frame(+tag: U32, body: Bytes.Bytes) -> Bytes.Bytes:
Codec.packet.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=packet.of)
def packet.of(r: Bytes.Bytes & U32) -> Bytes.Bytes:
Codec.packet (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=packet)
# An untagged startup-phase packet.
def packet(body: Bytes.Bytes) -> Bytes.Bytes:
Codec.n16.con (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=n16.con)
def n16.con(h: Bytes.Bytes, r: List<&1, Bytes.Bytes> & U32) -> List<&1, Bytes.Bytes> & U32:
Codec.n16.count (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=n16.count)
def n16.count(xs: List<&1, Bytes.Bytes>) -> List<&1, Bytes.Bytes> & U32:
Codec.n16.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=n16.of)
def n16.of(r: List<&1, Bytes.Bytes> & U32) -> Bytes.Bytes:
Codec.n16 (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=n16)
# An int16 count, then the pieces.
def n16(xs: List<&1, Bytes.Bytes>) -> Bytes.Bytes:
Codec.be16s (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=be16s)
def be16s(xs: List<&2, U32>) -> List<&1, Bytes.Bytes>:
Codec.be32s (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=be32s)
def be32s(xs: List<&2, U32>) -> List<&1, Bytes.Bytes>:
Codec.value.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=value.of)
def value.of(r: Bytes.Bytes & U32) -> Bytes.Bytes:
Codec.value (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=value)
# An int32 length then the bytes; -1 and nothing for NULL.
def value(m: Maybe<&1, Bytes.Bytes>) -> Bytes.Bytes:
Codec.values (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=values)
def values(xs: List<&1, Maybe<&1, Bytes.Bytes>>) -> List<&1, Bytes.Bytes>:
Codec.params.enc (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=params.enc)
def params.enc(xs: List<&1, Param>) -> List<&1, Bytes.Bytes>:
Codec.names.enc (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=names.enc)
def names.enc(xs: List<&1, Bytes.Bytes>) -> List<&1, Bytes.Bytes>:
Codec.notices.enc (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notices.enc)
def notices.enc(xs: List<&1, Notice>) -> List<&1, Bytes.Bytes>:
Codec.fields.enc (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fields.enc)
def fields.enc(xs: List<&1, Field>) -> List<&1, Bytes.Bytes>:
Codec.encode (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=encode)
# The wire bytes of a frontend message.
def encode(m: Front) -> Bytes.Bytes:
Codec.auth.enc (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=auth.enc)
def auth.enc(+code: U32, payload: Bytes.Bytes) -> Bytes.Bytes:
Codec.encode.back (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=encode.back)
# The wire bytes of a backend message, as a server sends it.
def encode.back(m: Back) -> Bytes.Bytes:
Codec.Cur (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Cur)
# The buffer, the next byte i, the end e of the message body (e <= len), and whether every read so far fit.
# A read that does not fit clears ok and leaves i; the message is Bad unless ok holds and i reaches e.
type Cur is Type:
Cur{b: Bytes.Bytes, i: U32, e: U32, ok: Bool}
Codec.fail (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fail)
def fail(c: Cur) -> Cur:
Codec.need (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=need)
def need(ok: Bool, c: Cur) -> Cur:
Codec.left (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=left)
def left(c: Cur) -> Cur & Nat:
Codec.uint.got (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=uint.got)
def uint.got(+i: U32, +n: U32, +e: U32, +ok: Bool, r: Bytes.Bytes & Maybe<&2, U32>) -> Cur & U32:
Codec.uint.at (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=uint.at)
def uint.at(fit: Bool, b: Bytes.Bytes, +i: U32, +n: U32, +e: U32, +ok: Bool) -> Cur & U32:
Codec.uint (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=uint)
# A big-endian unsigned integer of n bytes (1, 2 or 4).
def uint(c: Cur, +n: U32) -> Cur & U32:
Codec.take.got (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=take.got)
def take.got(+i: U32, +e: U32, +ok: Bool, r: Bytes.Bytes & Bytes.Bytes) -> Cur & Bytes.Bytes:
Codec.take.at (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=take.at)
def take.at(fit: Bool, b: Bytes.Bytes, +i: U32, +n: U32, +e: U32, +ok: Bool) -> Cur & Bytes.Bytes:
Codec.take (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=take)
# The next n bytes, copied out.
def take(c: Cur, +n: U32) -> Cur & Bytes.Bytes:
Codec.rest (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=rest)
def rest(c: Cur) -> Cur & Bytes.Bytes:
Codec.nul (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=nul)
def nul() -> String:
Codec.cstr.in (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=cstr.in)
def cstr.in(inside: Bool, b: Bytes.Bytes, +i: U32, +j: U32, +e: U32, +ok: Bool) -> Cur & Bytes.Bytes:
Codec.cstr.at (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=cstr.at)
def cstr.at(+i: U32, +e: U32, +ok: Bool, r: Bytes.Bytes & Maybe<&2, U32>) -> Cur & Bytes.Bytes:
Codec.cstr (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=cstr)
# The bytes before the next NUL inside the body, and the cursor past it.
def cstr(c: Cur) -> Cur & Bytes.Bytes:
Codec.u16s (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=u16s)
def u16s(c: Cur) -> Cur & U32:
Codec.u32s (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=u32s)
def u32s(c: Cur) -> Cur & U32:
Codec.many (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=many)
# n more items after the one in r, oldest last in acc.
def many(~A: Type, ~item: Cur -> Cur & A, n: Nat, r: Cur & A, acc: List<&1, A>) -> Cur & List<&1, A>:
Codec.n16.go (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=n16.go)
def n16.go(~A: Type, ~item: Cur -> Cur & A, zero: Bool, +k: U32, c: Cur) -> Cur & List<&1, A>:
Codec.n16.dec (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=n16.dec)
# An int16 count, then that many items.
def n16.dec(~A: Type, ~item: Cur -> Cur & A, r: Cur & U32) -> Cur & List<&1, A>:
Codec.list16 (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=list16)
def list16(~A: Type, ~item: Cur -> Cur & A, c: Cur) -> Cur & List<&1, A>:
Codec.dup (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=dup)
def dup(xs: List<&1, U32>) -> List<&2, U32>:
Codec.col.some (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=col.some)
def col.some(r: Cur & Bytes.Bytes) -> Cur & Maybe<&1, Bytes.Bytes>:
Codec.col.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=col.of)
def col.of(null: Bool, +n: U32, c: Cur) -> Cur & Maybe<&1, Bytes.Bytes>:
Codec.col.len (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=col.len)
def col.len(r: Cur & U32) -> Cur & Maybe<&1, Bytes.Bytes>:
Codec.col (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=col)
# An int32 length then the bytes; -1 is NULL, and any other negative length does not fit.
def col(c: Cur) -> Cur & Maybe<&1, Bytes.Bytes>:
Codec.Loop (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Loop)
# A loop up to a terminator: Go holds an item still to push, Stop the end. acc is reversed.
type Loop<-A: Type, -B: Type> is Type:
Go{c: Cur, x: A, acc: List<&1, B>}
Stop{c: Cur, acc: List<&1, B>}
Codec.loop.end (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=loop.end)
# Out of fuel before the terminator is Bad.
def loop.end(-A: Type, -B: Type, s: Loop) -> Cur & List<&1, B>:
Codec.loop.pick (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=loop.pick)
def loop.pick(-A: Type, -B: Type, stop: Bool, c: Cur, x: A, acc: List<&1, B>) -> Loop:
Codec.strs.len (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=strs.len)
def strs.len(c: Cur, acc: List<&1, Bytes.Bytes>, r: Bytes.Bytes & U32) -> Loop:
Codec.strs.read (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=strs.read)
def strs.read(acc: List<&1, Bytes.Bytes>, r: Cur & Bytes.Bytes) -> Loop:
Codec.strs (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=strs)
# Each string takes a byte, so fuel of the bytes left is enough.
def strs(f: Nat, s: Loop) -> Cur & List<&1, Bytes.Bytes>:
Codec.strs.start (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=strs.start)
def strs.start(r: Cur & Nat) -> Cur & List<&1, Bytes.Bytes>:
Codec.names.dec (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=names.dec)
# NUL-terminated strings up to an empty one.
def names.dec(c: Cur) -> Cur & List<&1, Bytes.Bytes>:
Codec.pr.len (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=pr.len)
def pr.len(c: Cur, acc: List<&1, Param>, r: Bytes.Bytes & U32) -> Loop:
Codec.pr.read (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=pr.read)
def pr.read(acc: List<&1, Param>, r: Cur & Bytes.Bytes) -> Loop:
Codec.pr.val (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=pr.val)
def pr.val(name: Bytes.Bytes, acc: List<&1, Param>, r: Cur & Bytes.Bytes) -> Loop:
Codec.prs (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=prs)
# Name and value pairs up to an empty name; a value may be empty. Each pair takes two bytes.
def prs(f: Nat, s: Loop) -> Cur & List<&1, Param>:
Codec.prs.start (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=prs.start)
def prs.start(r: Cur & Nat) -> Cur & List<&1, Param>:
Codec.params.dec (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=params.dec)
def params.dec(c: Cur) -> Cur & List<&1, Param>:
Codec.notice.code (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notice.code)
def notice.code(acc: List<&1, Notice>, r: Cur & U32) -> Loop:
Codec.notice.push (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notice.push)
def notice.push(+code: U32, acc: List<&1, Notice>, r: Cur & Bytes.Bytes) -> Loop:
Codec.notices (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notices)
# Fields up to a zero code byte; each takes two bytes, so the bytes left are enough fuel.
def notices(f: Nat, s: Loop) -> Cur & List<&1, Notice>:
Codec.notices.start (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notices.start)
def notices.start(r: Cur & Nat) -> Cur & List<&1, Notice>:
Codec.notices.dec (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=notices.dec)
def notices.dec(c: Cur) -> Cur & List<&1, Notice>:
Codec.fd.g (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fd.g)
def fd.g(name: Bytes.Bytes, +tb: U32, +col: U32, +oid: U32, +sz: U32, +md: U32, r: Cur & U32) -> Cur & Field:
Codec.fd.f (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fd.f)
def fd.f(name: Bytes.Bytes, +tb: U32, +col: U32, +oid: U32, +sz: U32, r: Cur & U32) -> Cur & Field:
Codec.fd.e (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fd.e)
def fd.e(name: Bytes.Bytes, +tb: U32, +col: U32, +oid: U32, r: Cur & U32) -> Cur & Field:
Codec.fd.d (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fd.d)
def fd.d(name: Bytes.Bytes, +tb: U32, +col: U32, r: Cur & U32) -> Cur & Field:
Codec.fd.c (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fd.c)
def fd.c(name: Bytes.Bytes, +tb: U32, r: Cur & U32) -> Cur & Field:
Codec.fd.b (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fd.b)
def fd.b(name: Bytes.Bytes, r: Cur & U32) -> Cur & Field:
Codec.fd.a (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=fd.a)
def fd.a(r: Cur & Bytes.Bytes) -> Cur & Field:
Codec.field (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=field)
def field(c: Cur) -> Cur & Field:
Codec.one (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=one)
def one(-A: Type, f: A -> Back, r: Cur & A) -> Cur & Back:
Codec.ps.b (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=ps.b)
def ps.b(name: Bytes.Bytes, r: Cur & Bytes.Bytes) -> Cur & Back:
Codec.ps.a (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=ps.a)
def ps.a(r: Cur & Bytes.Bytes) -> Cur & Back:
Codec.bkd.b (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=bkd.b)
def bkd.b(+pid: U32, r: Cur & U32) -> Cur & Back:
Codec.bkd.a (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=bkd.a)
def bkd.a(r: Cur & U32) -> Cur & Back:
Codec.rfq (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=rfq)
def rfq(r: Cur & U32) -> Cur & Back:
Codec.auth.data (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=auth.data)
def auth.data(k: U32, +code: U32, r: Cur & Bytes.Bytes) -> Cur & Back:
Codec.auth.of (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=auth.of)
def auth.of(k: U32, +code: U32, c: Cur) -> Cur & Back:
Codec.auth (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=auth)
def auth(r: Cur & U32) -> Cur & Back:
Codec.back (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=back)
def back(t: U32, +tag: U32, c: Cur) -> Cur & Back:
Codec.Reader (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Reader)
# Bytes read from the server, and the index of the first byte not yet decoded.
type Reader is Type:
Reader{buf: Bytes.Bytes, pos: U32}
Codec.reader (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=reader)
def reader() -> Reader:
Codec.feed.at (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=feed.at)
def feed.at(zero: Bool, buf: Bytes.Bytes, +pos: U32, chunk: Bytes.Bytes) -> Reader:
Codec.feed (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=feed)
# Drops the decoded bytes, then adds chunk.
def feed(r: Reader, chunk: Bytes.Bytes) -> Reader:
Codec.Next (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=Next)
# One message; Want until it has all arrived; Bad for a length below 4 or above 1 GiB,
# or a body its tag does not fill exactly. After Bad the stream has lost its framing.
type Next is Type:
Got{m: Back}
Want{}
Bad{}
Codec.next.done (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=next.done)
def next.done(ok: Bool, +pos: U32, +e: U32, buf: Bytes.Bytes, m: Back) -> Reader & Next:
Codec.next.body (https://jend.leeeet.dev/definition.txt?path=bend-kit-postgres@0.3.0.0/codec.bend&name=next.body)
def next.body(+pos: U32, r: Cur & Back) -> Reader & Next:
More: https://jend.leeeet.dev/packages/bend-kit-postgres.txt?definitions_offset=100