def snapshot.root.cursor.opened

mylsm-lsm-store@0.6.0.1 · src/ByteDurableDb.bend:2779

import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb
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/SstCursor.bend as SstCursor
import mylsm-lsm-store@0.6.0.1/src/scan/RangeCursor.bend as RangeCursor
import mylsm-lsm-store@0.6.0.1/src/scan/VisibleCursor.bend as VisibleCursor

2779def snapshot.root.cursor.opened(
2780  retained_bytes: Nat,
2781  delta: List<&1, ByteMemTable.Entry>,
2782  bounds: RangeCursor.Bounds,
2783  opened: Result<&1, &1, U32 & String, SstCursor.Cursor>
2784) -> IO(Result<&1, &1, Error, SnapshotCursorRoot>):
2785  match opened:
2786    case Fail{(code, message)}:
2787      IO.pure(Result<&1, &1, Error, SnapshotCursorRoot>,
2788        Fail{recovery.error(code, message)})
2789    case Done{base}:
2790      IO.pure(Result<&1, &1, Error, SnapshotCursorRoot>,
2791        Done{SnapshotCursorRoot{retained_bytes,
2792          VisibleCursor.open(Some{base}, delta, bounds)}})

Uses (17)

Used by (1)