ByteDurableDb.get: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb Lines 1553-1567 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=1553&end_line=1567 import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes # Reads one raw byte key while retaining the database handle. def get( handle: Handle, key: Bytes.Bytes ) -> IO(Handle & Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>): match handle: case Handle{path, lock, table, Open{}, base_stats}: do IO>>: pair : Handle & Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>> <- get.pathcopies(path.clone.pair(path), lock, key, table) return get.retained(base_stats, pair) case Handle{path, lock, table, Poisoned{}, base_stats}: IO.pure(Handle & Result<&1, &1, Error, Maybe<&1, Bytes.Bytes>>, (Handle{path, lock, table, Poisoned{}, base_stats}, Fail{CommitUnknown{0, "database handle requires reopen"}})) Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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=bend-kit-bytes@0.3.3.0/bytes.bend&name=Bytes 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=HandleState https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=get.pathcopies https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=get.retained https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=path.clone.pair