ByteDurableDb.batch.validation.decided: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb Lines 1743-1760 of mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend: https://jend.leeeet.dev/read.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&start_line=1743&end_line=1760 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 import mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend as BatchPolicy def batch.validation.decided( handle: Handle, entries: List<&1, ByteMemTable.Entry>, mutations: List<&1, ByteWal.Mutation>, validation: BatchPolicy.Validation ) -> IO(Handle & Result<&1, &1, Error, BatchPrepared>): match validation: case BatchPolicy.ValidBatch{}: batch.prepare(handle, mutations, entries) case BatchPolicy.BatchBytesExceeded{}: IO.pure(Handle & Result<&1, &1, Error, BatchPrepared>, (handle, Fail{ResourceLimit{}})) case BatchPolicy.BatchCountExceeded{}: IO.pure(Handle & Result<&1, &1, Error, BatchPrepared>, (handle, Fail{ResourceLimit{}})) case _: IO.pure(Handle & Result<&1, &1, Error, BatchPrepared>, (handle, Fail{InvalidArgument{}})) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=BatchPrepared https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=Error https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=Handle https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=batch.prepare https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteMemTable.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteWal.bend&name=Mutation https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/DurableBatchPolicy.bend&name=Validation