def Bytes.delete
import mylsm-lsm-store@0.6.0.1/mylsm.bend as Mylsmimport Base
import bend-kit-bytes@0.3.2.0/bytes.bend as PackedBytes
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as RawByteDb
import mylsm-lsm-store@0.6.0.1/src/coordinator/Client.bend as OwnerClient
import mylsm-lsm-store@0.6.0.1/src/coordinator/ByteClient.bend as OwnerByteClient
715def Bytes.delete(
716 handle: Bytes.Handle,
717 key: PackedBytes.Bytes
718) -> IO(Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>):
719 match handle:
720 case ByteHandle{raw}:
721 do IO<Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>>:
722 pair : RawByteDb.Handle & Result<&1, &1, RawByteDb.Error, Unit> <- RawByteDb.delete(raw, key)
723 return Bytes.delete.result(pair)
724 case RemoteByteHandle{session}:
725 do IO<Bytes.Handle & Result<&1, &1, Bytes.Error, Unit>>:
726 pair : OwnerClient.Session & Result<&1, &1, OwnerClient.Error, Unit> <-
727 OwnerByteClient.delete(session, key)
728 return Bytes.owner.unit.result(pair)
Uses (17)
Used by (0)
No other definition uses this definition.