def ready.delta
mylsm-lsm-store@0.6.0.1 · src/scan/VisibleCursor.bend:348
import mylsm-lsm-store@0.6.0.1/src/scan/VisibleCursor.bend as VisibleCursor
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend as ByteMemTable
import mylsm-lsm-store@0.6.0.1/src/scan/RangeCursor.bend as RangeCursor
import mylsm-lsm-store@0.6.0.1/src/scan/SstCursor.bend as SstCursor
348def ready.delta(
349 base: Maybe<&1, SstCursor.Cursor>,
350 pending: Maybe<&1, ByteMemTable.Entry>,
351 bounds: RangeCursor.Bounds,
352 head: DeltaHead
353) -> Step:
354 match base:
355 case Some{base_cursor}:
356 match pending:
357 case Some{base_entry}:
358 match head:
359 case DeltaDone{}:
360 Item{base_entry, Active{Some{base_cursor}, None{}, Nil{}, bounds, None{}}}
361 case DeltaReady{entry, tail}:
362 resolve(Some{base_cursor}, base_entry, entry, tail, bounds)
363 case None{}: End{}
364 case None{}:
365 match pending:
366 case None{}:
367 match head:
368 case DeltaDone{}: End{}
369 case DeltaReady{entry, tail}:
370 delta.output(entry, None{}, None{}, tail, bounds)
371 case Some{_}: End{}