def allocate_resource_id.maximum

mylsm-lsm-store@0.6.0.1 · src/scan/Snapshot.bend:198

import mylsm-lsm-store@0.6.0.1/src/scan/Snapshot.bend as Snapshot
import Base

198def allocate_resource_id.maximum(
199  next_ids: U32 & U32,
200  at_max: Bool
201) -> ResourceIdDecision:
202  match next_ids:
203    case (next_id, increment_id):
204      match at_max:
205        case True{}:
206          ResourceIdAllocated{next_id,
207            ResourceIdAllocator{increment_id, True{}}}
208        case False{}:
209          ResourceIdAllocated{next_id,
210            ResourceIdAllocator{U32.add(increment_id, 1), False{}}}

Uses (7)

Used by (1)