def encode.range

mylsm-lsm-store@0.6.0.1 · src/coordinator/CursorOpenCodec.bend:43

import mylsm-lsm-store@0.6.0.1/src/coordinator/CursorOpenCodec.bend as CursorOpenCodec
import Base
import mylsm-lsm-store@0.6.0.1/src/coordinator/Protocol.bend as Protocol
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

43# Encodes one full range request with an owner snapshot token.
44def encode.range(
45  snapshot_id: U32,
46  lower: Maybe<&1, Bytes.Bytes>,
47  upper: Maybe<&1, Bytes.Bytes>
48) -> Bytes.Bytes:
49  Bytes.concat([Protocol.snapshot.id.bytes(snapshot_id),
50    Protocol.u32.bytes(0), bound.encode(lower), bound.encode(upper)])

Uses (8)

Used by (2)