/** * Updates the observable array (i.e. live query) * when a database change occurs, only if the query would give a different result * It basically achieves that by having an array of all the live queries taken from the database * Then on every update (insert/update/delete ... check datastore.ts) it checks the old result * and updates the observable array (live query result) if they're not the same */ import { Doc, Filter } from "../types"; import { Datastore } from "./datastore"; import { ObservableArray, Change } from "./observable"; interface LiveQuery { query: Filter; observable: ObservableArray>; toDBObserver: (changes: Change[]) => void; id?: string; } export declare class Live { private db; private queries; constructor(db: Datastore); addLive(q: LiveQuery): string; update(): Promise; kill(uid: string): void; } export {};