/// declare namespace NajsEloquent.QueryGrammar { interface IAdvancedQuery { /** * Execute query and returns the first record. */ first(): Promise<(Result) | null>; /** * Find first record by id */ first(id: any): Promise<(Result) | null>; /** * Execute query and returns the first record. */ find(): Promise<(Result) | null>; /** * Find first record by id */ find(id: any): Promise<(Result) | null>; /** * Execute query and return the records as a Collection. */ get(): Promise>; /** * Select some fields and get the result as Collection */ get(...fields: Array): Promise>; /** * Execute query and return the records as a Collection. */ all(): Promise>; /** * Execute query and returns "pluck" result. */ pluck(valueKey: string): Promise; /** * Execute query and returns "pluck" result. */ pluck(valueKey: string, indexKey: string): Promise; /** * Find first record by id * @param {string} id */ findById(id: any): Promise; /** * Find first record by id and throws NotFoundException if there is no record * @param {string} id */ findOrFail(id?: any): Promise; /** * Find first record by id and throws NotFoundException if there is no record * @param {string} id */ firstOrFail(id?: any): Promise; } }