import { FindManyOptions, FindOneOptions, QueryRunner, Repository, SelectQueryBuilder } from 'typeorm'; import { ObjectLiteral } from 'typeorm/common/ObjectLiteral'; export declare class BaseRepository extends Repository { protected useCache: boolean; setQueryRunner(queryRunner: QueryRunner): void; getUseCache(): boolean; setUseCache(uCache: boolean): void; /** * @deprecated */ protected setCacheOptions(options: FindOneOptions | FindManyOptions, cacheKey: string, cacheSeconds?: number): FindOneOptions | FindManyOptions; /** * @deprecated */ protected setCacheQb(qb: SelectQueryBuilder, cacheKey: string, cacheSeconds?: number): SelectQueryBuilder; private getCalledMethodName; /** * Usage this.getCacheKey(arguments) */ protected getCacheKey(props: IArguments): string; searchQueryBuilder(search: any): SelectQueryBuilder; /** * Usage: * const cacheKey = this.getCacheKey(arguments); * return await this.cached(cacheKey, () => this.find({})); */ cached any>(cacheKey: string | null | undefined, callback: T, expireInSeconds?: number): Promise>; searchCount(search: any): Promise; search(search: any): Promise; upsert(entity: Entity, data: any): Promise; findOne(id: any, options?: FindOneOptions): Promise; findOneWithCache(id: any, options?: FindOneOptions): Promise; findOneByIdOrFail(id: any, options?: FindOneOptions): Promise; findOneByIdOrFailWithCache(id: any, options?: FindOneOptions): Promise; paginate(qb: SelectQueryBuilder, page: number, limit: number): SelectQueryBuilder; }