def verify_count

mylsm-lsm-store@0.6.0.1 · src/transfer/RestoreIo.bend:187

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

187# Rejects a staged database whose recovered entry count differs from the exchange.
188def verify_count(path: String, equal: Bool) -> IO(Result<&1, &1, Error, Unit>):
189  match equal:
190    case False{}:
191      do IO<Result<&1, &1, Error, Unit>>:
192        cleanup.directory(path)
193        return Fail{VerificationFailed{}}
194    case True{}: IO.pure(Result<&1, &1, Error, Unit>, Done{Unit{}})

Uses (9)

Used by (1)