/** * database adapter interface for retrieve entities */ export interface IAdapter { /** * insert a record */ insert(record: T): PromiseLike; /** * get number of matches for the query */ count(query: any, options?: any): PromiseLike; get(id: any): PromiseLike; /** * find out all the matched records */ find(query: any, option?: any): PromiseLike; /** * find the first matched record */ findOne(query: any, option?: any): PromiseLike; /** * update all the matched records */ update(query: any, operations: any, options?: any): PromiseLike; /** * remove all the matched records */ remove(query: any, options?: any): PromiseLike; }