ByteDurableDb.compact: def of mylsm-lsm-store@0.6.0.1 Import: import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as ByteDurableDb Lines 1036-1043 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=1036&end_line=1043 import Base import mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend as VisibleStats # Publishes a canonical byte table with tombstones removed. def compact(handle: Handle) -> IO(Handle & Result<&1, &1, Error, Unit>): match handle: case Handle{path, lock, table, Open{}, base_stats}: compact.pathcopies(path.clone.pair(path), lock, table) case Handle{path, lock, table, Poisoned{}, base_stats}: IO.pure(Handle & Result<&1, &1, Error, Unit>, (Handle{path, lock, table, Poisoned{}, VisibleStats.Stats{0n, 0n}}, Fail{CommitUnknown{0, "database handle requires reopen"}})) Uses (12): 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=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=Base/base.bend&name=Unit 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=compact.pathcopies https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend&name=path.clone.pair https://jend.leeeet.dev/definition.txt?path=mylsm-lsm-store@0.6.0.1/src/scan/VisibleStats.bend&name=Stats