Reads the committed record of one key.
The derived key
The record, or undefined when either of its rows is missing or
of another kind
Deletes the rows of up to limit records whose expiresAt < before.
Epoch milliseconds
Maximum records deleted
The number of records deleted
ONE transaction: creates the claim row (claim.id) FIRST, runs work with
the transaction's scope, then creates the result row (${claim.id}.r) from
the result work returns, and commits.
Only creates — no update and no delete — so every supported backend can
perform it. Rejects, rolling everything back, when a create or the commit
is refused or when work throws.
The caller's result type, unconstrained
The claim to create first
The work, given the transaction's scope, returning the encoded result and the caller's value
What work returned
Refuses, at startup, a backend that cannot serve tier C, by name, by
running exactly run's write pattern (two creates on distinct keys) in a
transaction that always rolls back. Leaves no row.
A promise that rejects naming why the store cannot serve
The store port a tier-C (
within) provider writes through: the work and its idempotency record commit in ONE transaction, so a lost race rolls the business writes back with the claim.Every method returns a promise that REJECTS on failure and never throws synchronously. A read requires
kindto equalIDEMPOTENCY_RECORD_KIND, and a row of anotherkindis treated as missing; a custom store must honour both rules.Since
0.9.0