import { Adapter, QueryOptions, GetOptions, JoinOptions } from './index'; import { ModelCtor } from '../model'; export interface AdapterOptions { models: ModelCtor[]; } export declare abstract class AdapterBase implements Adapter { private models; constructor(opts: AdapterOptions); /** * Ensures all tables exist, and waits for them to be ready. */ ensure(): Promise; /** * Save the model to the Database. * * If replace is set to true, the entire model will be **replaced**. Otherwise * default action would be to update the document. */ save(model: M, replace?: boolean): Promise; delete(model: M): Promise; join(model: M, relationshipKey: string, opts?: JoinOptions): Promise; private getModelByName(name); abstract all(ctor: ModelCtor, opts?: QueryOptions): Promise; abstract find(ctor: ModelCtor, filter: Partial, opts?: QueryOptions): Promise; abstract findOne(ctor: ModelCtor, filter: Partial, opts?: QueryOptions): Promise; abstract get(ctor: ModelCtor, value: any, opts?: GetOptions): Promise; abstract getOne(ctor: ModelCtor, value: any, opts?: GetOptions): Promise; protected abstract ensureTable(ctor: ModelCtor): Promise; protected abstract updateStore(model: any, payload: any, replace: boolean): Promise; protected abstract deleteFromStore(model: any): Promise; }