import { OrmDriver } from "./OrmDriver"; import { ISubscription } from "rxjs/Subscription"; import Collection from "./Collection"; import { EntityClass, MaybeEntityClass } from './utils'; import { IObservable } from './IObservable'; export declare type Operator = "==" | ">=" | ">" | "<" | "<="; export default class Query implements IObservable { model: EntityClass; collection: Collection; ormDriver: OrmDriver; _orderBy: string[] | null; _startAt: number | null; _limit: number | null; private _whereClauses; constructor(ormDriver: OrmDriver, model: MaybeEntityClass | Collection); orderBy(...fields: string[]): Query; limit(number: number): Query; startAt(index: number): Query; subscribe(handler: (array: T[]) => void): ISubscription; observe: (handler: (array: T[]) => void) => ISubscription; where(field: string, operator?: Operator, value?: string): Query; exec(): Promise; }