The engine drops no table that it never made, and exports what another file imports
Jonas Templestein, 2026-11-26 23:05 UTC · f250467f0752774f8874a036ee43107b738e23ca · parent 5a3f216
1 file changed
M core/itx/src/context/reactive-catalog.ts
@@ -122,7 +122,7 @@ } /** Where a row stands in a window: the order's own value (0 for the order `path`), then the path. */ -export type SortKey = [at: number, path: string]; +type SortKey = [at: number, path: string]; /** Each order's index of the facts, and the column that holds the order's own value there and in * `rcat_row`. The order `path` has none: the path is the whole key. */ @@ -133,7 +133,7 @@ } as const satisfies Record<CatalogOrder, { facts: string; column: string }>; /** Negative: `a` is before `b` in the window. */ -export function compareSortKeys(order: CatalogOrder, a: SortKey, b: SortKey): number { +function compareSortKeys(order: CatalogOrder, a: SortKey, b: SortKey): number { if (order === "path") return compareTextBinary(a[1], b[1]); if (a[0] !== b[0]) return a[0] > b[0] ? -1 : 1; return -compareTextBinary(a[1], b[1]); @@ -176,7 +176,7 @@ /** The facts of a row: the kernel's own (`$parent`, `$under` for the path and each ancestor, * `$processor`), then each scalar and each scalar of a list at the top of `metadata`. A key that * starts with `$` is the kernel's. At most `CATALOG_LIMITS.factsPerRow`; the kernel's come first. */ -export function extractFacts( +function extractFacts( path: string, processors: readonly string[], metadata: Record<string, unknown>, @@ -455,7 +455,6 @@ // and filled again. A new generation: no cursor of the old tables is good for the new ones. for (const table of [ "rcat_row", - "rcat_fact", "rcat_fact_active", "rcat_fact_created", "rcat_fact_path", @@ -1399,7 +1398,7 @@ } } -export type WriteResult = { +type WriteResult = { /** The catalog's revision after the write. */ rev: number; /** How many rows changed: a row equal to the stored one is not counted. */