def handle

bend-kit-commands@0.4.0.0 · commands.bend:386

import bend-kit-commands@0.4.0.0/commands.bend as Commands
import Base
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

386# Runs one command in one transaction: find its record, read the rows that keys names, decide, and commit rows, record, and effects.
387# at is the record's time for prune, in seconds. decide sees the committed rows, one for each key in order, and the payload.
388def handle(
389  ~keys: Bytes.Bytes -> List<Bytes.Bytes>,
390  ~decide: List<Row> -> Bytes.Bytes -> Decision<List<Row>, Bytes.Bytes, Bytes.Bytes>,
391  +st: Store, id: String, payload: Bytes.Bytes, at: U32
392) -> Run(Reply<Bytes.Bytes>):
393  do IO<Result<&1, &1, U32 & String, Reply<Bytes.Bytes>>>:
394    r : Result<&1, &1, U32 & String, Reply<Bytes.Bytes>> <- handle.txn(~keys, ~decide, st, id, payload, at)
395    handle.end(r, st)

Uses (15)

Used by (0)

No other definition uses this definition.