import { CompressedPatch, Document } from "../generic/types"; import * as immutable from "immutable"; declare type Record = immutable.Map | undefined; declare type Records = immutable.List; declare type Index = immutable.Map>; declare type Indexes = immutable.Map; export declare type WhereCondition = { [field: string]: any; }; export declare type SetCondition = immutable.Map | { [field: string]: any; }; interface ChangeTracker { changes: immutable.Set>; from_db: Document; } export declare class DBDocument implements Document { private primary_keys; private string_cols; private records; private everything; private indexes; private change_tracker; readonly size: number; private to_str_cache?; constructor(primary_keys: Set, string_cols: Set, records?: Records, everything?: immutable.Set, indexes?: Indexes, change_tracker?: ChangeTracker); private init_everything; private init_indexes; private init_change_tracker; to_str(): string; is_equal(other?: DBDocument): boolean; apply_patch(patch: CompressedPatch): DBDocument; make_patch(other: DBDocument): CompressedPatch; private primary_key_cols; private select; private parse; set(obj: SetCondition | SetCondition[]): DBDocument; private delete_array; delete(where: WhereCondition | WhereCondition[]): DBDocument; get(where: WhereCondition): Records; get_one(where: WhereCondition): Record | undefined; private primary_key_part; changed_keys(other: DBDocument): immutable.Set; changes(prev?: DBDocument): immutable.Set; count(): number; } export declare function from_str(s: string, primary_keys: string[], string_cols: string[]): DBDocument; export {};