def parse.records.decision

mylsm-lsm-store@0.6.0.1 · src/SstFile.bend:780

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

780def parse.records.decision(read: RecordRead) -> RecordDecision:
781  match read:
782    case Record{cursor, Fail{error}, _, _, _, _, _}:
783      Rejected{cursor, error}
784    case Record{cursor, Done{_}, False{}, _, _, _, _}:
785      OutOfBounds{cursor}
786    case Record{cursor, Done{_}, True{}, False{}, _, _, _}:
787      OutOfOrder{cursor}
788    case Record{cursor, Done{_}, True{}, True{}, True{}, False{}, _}:
789      LastMalformed{cursor}
790    case Record{cursor, Done{Rec{entry, _}}, True{}, True{}, True{}, True{}, +key}:
791      LastRecord{cursor, entry, key}
792    case Record{cursor, Done{Rec{entry, +used}}, True{}, True{}, False{}, _, +key}:
793      MoreRecords{cursor, entry, key, used}

Uses (5)

Used by (2)