def publish

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

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

340# Reopens staged data and checks that recovery sees the expected record count.
341def publish(
342  +destination: String,
343  +temporary: String,
344  expected: Nat
345) -> IO(Result<&1, &1, Error, Unit>):
346  do IO<Result<&1, &1, Error, Unit>>:
347    opened : Result<&1, &1, Db.Error, Db.Handle> <- Db.open_existing(path.clone(temporary))
348    verified : Result<&1, &1, Error, Unit> <- verified(temporary, expected, opened)
349    published : Result<&1, &1, Error, Unit> <- publish.verified(destination, temporary, verified)
350    return published

Uses (14)

Used by (1)