import { DifferentialWatchedQuery, DifferentialWatchedQueryComparator, DifferentialWatchedQuerySettings, WatchedQueryDifferential } from '@powersync/common'; import { AbstractQueryProcessor, AbstractQueryProcessorOptions, LinkQueryOptions } from './AbstractQueryProcessor.js'; /** * @internal */ export interface DifferentialQueryProcessorOptions extends AbstractQueryProcessorOptions> { rowComparator?: DifferentialWatchedQueryComparator; } type DataHashMap = Map; /** * An empty differential result set. * This is used as the initial state for differential incrementally watched queries. * * @internal */ export declare const EMPTY_DIFFERENTIAL: { added: never[]; all: never[]; removed: never[]; updated: never[]; unchanged: never[]; }; /** * Default implementation of the {@link DifferentialWatchedQueryComparator} for watched queries. * It keys items by their `id` property if available, alternatively it uses JSON stringification * of the entire item for the key and comparison. * * @internal */ export declare const DEFAULT_ROW_COMPARATOR: DifferentialWatchedQueryComparator; /** * Uses the PowerSync onChange event to trigger watched queries. * Results are emitted on every change of the relevant tables. * @internal */ export declare class DifferentialQueryProcessor extends AbstractQueryProcessor>, DifferentialWatchedQuerySettings> implements DifferentialWatchedQuery { protected options: DifferentialQueryProcessorOptions; protected comparator: DifferentialWatchedQueryComparator; constructor(options: DifferentialQueryProcessorOptions); protected differentiate(current: RowType[], previousMap: DataHashMap): { diff: WatchedQueryDifferential; map: DataHashMap; hasChanged: boolean; }; protected linkQuery(options: LinkQueryOptions>): Promise; } export {};