def write.mutations

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

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/ByteMemTable.bend as ByteMemTable
import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal

76def write.mutations(entries: List<&1, ByteMemTable.Entry>) -> List<&1, ByteWal.Mutation>:
77  match entries:
78    case Nil{}: Nil{}
79    case Con{ByteMemTable.Entry{key, value}, tail}:
80      match value:
81        case None{}: Con{ByteWal.Delete{key}, write.mutations(tail)}
82        case Some{value}: Con{ByteWal.Put{key, value}, write.mutations(tail)}

Uses (4)

Used by (1)