def entry.next
import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReaderimport Base
1740# Returns one entry and reads another SST block only when the current block is empty.
1741def entry.next(cursor: EntryCursor) -> IO(EntryStep):
1742 match cursor:
1743 case EntryReady{reader, entries}:
1744 match entries:
1745 case Con{entry, tail}:
1746 IO.pure(EntryStep, EntryItem{entry, EntryReady{reader, tail}})
1747 case Nil{}:
1748 do IO<EntryStep>:
1749 result : Result<&1, &1, U32 & String, Step> <- next(reader)
1750 entry.result(result)
1751 case EntryEnded{}: IO.pure(EntryStep, EntryEnd{})
1752 case EntryClosed{}: IO.pure(EntryStep, EntryEnd{})
1753 case EntryFailed{error}:
1754 IO.pure(EntryStep, EntryError{EntryFailed{error}})
Uses (13)
Used by (0)
No other definition uses this definition.