import { Table } from './database'; import { UniqueKey, RelatedField, Document, Value } from 'sqlex'; import { FlushState } from './flush'; import { Row } from './engine'; export declare type FieldValue = Value | Record; export declare const RecordProxy: { set: (record: Record, name: string, value: any) => boolean; get: (record: Record, name: string) => any; }; export declare class Record { [key: string]: any; __table: Table; __data: { [key: string]: FieldValue; }; __state: FlushState; __related: { [key: string]: RecordSet; }; __inserted: boolean; constructor(table: Table); get(name: string): FieldValue | undefined; save(): Promise; update(data?: Row): Promise; delete(): Promise; copy(data: Document, options?: any): Promise; __dirty(): boolean; __flushable(perfect?: number): boolean; __fields(): Row; __remove_dirty(keys: string | string[]): void; __is_inserted(): any; __getValue(name: string): Value; __primaryKey(): Value; __primaryKeyDirty(): boolean; __setPrimaryKey(value: Value): void; __filter(): Row; __valueOf(uc: UniqueKey): string; __merge(): void; __updateState(existing: Record): void; __json(): {}; __dump(): { __state: { method: string; dirty: string[]; deleted: boolean; merged: any; selected: boolean; }; }; __repr(): any; } export declare class RecordSet { record: Record; field: RelatedField; constructor(record: Record, field: RelatedField); add(record: any): Promise; replaceWith(): void; remove(record: Record): Promise; } export declare function getModel(table: Table, bulk?: boolean): any;