UNPKG

@tanstack/db-ivm

Version:

Incremental View Maintenance for TanStack DB based on Differential Dataflow

19 lines (18 loc) 670 B
import { MultiSet } from './multiset.js'; /** * A map from a difference collection trace's keys -> (value, multiplicities) that changed. * Used in operations like join and reduce where the operation needs to * exploit the key-value structure of the data to run efficiently. */ export declare class Index<K, V> { #private; constructor(); toString(indent?: boolean): string; get(key: K): Array<[V, number]>; getMultiplicity(key: K, value: V): number; has(key: K): boolean; get size(): number; addValue(key: K, value: [V, number]): void; append(other: Index<K, V>): void; join<V2>(other: Index<K, V2>): MultiSet<[K, [V, V2]]>; }