def handle.txn
bend-kit-commands@0.4.0.0 · commands.bend:362
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
362def handle.txn(
363 ~keys: Bytes.Bytes -> List<Bytes.Bytes>,
364 ~decide: List<Row> -> Bytes.Bytes -> Decision<List<Row>, Bytes.Bytes, Bytes.Bytes>,
365 st: Store, +id: String, payload: Bytes.Bytes, at: U32
366) -> Run(Reply<Bytes.Bytes>):
367 Store{db, begin, commit, rollback, find, read, save, del, keep, emit} = st
368 do Run<Reply<Bytes.Bytes>>:
369 exec(begin)
370 found : Maybe<Record<Bytes.Bytes, Bytes.Bytes>> <- seen.get(find, id)
371 handle.found(~keys, ~decide, found, read, payload, at, commit, save, del, keep, emit, id)