import type { Enum } from '../../../shared/src/enum.ts'; import type { InternalDiff } from '../btree/node.ts'; import type { Read } from '../dag/store.ts'; import { Commit, type Meta } from '../db/commit.ts'; import * as FormatVersion from '../format-version-enum.ts'; import type { Hash } from '../hash.ts'; type FormatVersion = Enum; /** * Interface allowing different diff functions to skip costly diff computations. */ export interface DiffComputationConfig { shouldComputeDiffs(): boolean; shouldComputeDiffsForIndex(name: string): boolean; } /** * The diffs in different indexes. The key of the map is the index name. * "" is used for the primary index. */ export declare class DiffsMap extends Map { set(key: string, value: InternalDiff): this; } /** * Diffs the state of the db at two different hashes. * It will include the primary indexes as well as all the secondary indexes. */ export declare function diff(oldHash: Hash, newHash: Hash, read: Read, diffConfig: DiffComputationConfig, formatVersion: FormatVersion): Promise; /** * Diffs the state of the db at two different commits. * It will include the primary indexes as well as all the secondary indexes. */ export declare function diffCommits(oldCommit: Commit, newCommit: Commit, read: Read, diffConfig: DiffComputationConfig, formatVersion: FormatVersion): Promise; export declare function addDiffsForIndexes(mainCommit: Commit, syncCommit: Commit, read: Read, diffsMap: DiffsMap, diffConfig: DiffComputationConfig, formatVersion: FormatVersion): Promise; export {}; //# sourceMappingURL=diff.d.ts.map