import { Logger } from '@nestjs/common';
import { CommonEntity } from '../entities/common.entity';
import { RequestContextService } from '../services/request-context.service';
import { DataSource, EntityTarget, FindManyOptions, FindOneOptions, FindOptionsWhere, QueryRunner, Repository, SelectQueryBuilder, UpdateResult } from 'typeorm';
import { SecurityRuleRepository } from './security-rule.repository';
import { PickKeysByType } from 'typeorm/common/PickKeysByType';
export declare class SolidBaseRepository<T extends CommonEntity> extends Repository<T> {
    protected readonly requestContextService: RequestContextService | null;
    protected readonly securityRuleRepository: SecurityRuleRepository | null;
    protected readonly logger: Logger;
    constructor(entity: EntityTarget<T>, dataSource: DataSource, requestContextService: RequestContextService | null, securityRuleRepository: SecurityRuleRepository | null);
    modelSingularName(): string;
    findOneByUserKey(userKeyValue: string | number): Promise<T | null>;
    createQueryBuilder(alias?: string, queryRunner?: QueryRunner): SelectQueryBuilder<T>;
    createSecurityRuleAwareQueryBuilder(alias?: string, queryRunner?: QueryRunner): Promise<SelectQueryBuilder<T>>;
    findOne(options?: FindOneOptions<T>): Promise<T | null>;
    findOneBy(where: FindOptionsWhere<T> | FindOptionsWhere<T>[]): Promise<T | null>;
    findOneOrFail(options?: FindOneOptions<T>): Promise<T>;
    find(options?: FindManyOptions<T>): Promise<T[]>;
    findAndCount(options?: FindManyOptions<T>): Promise<[T[], number]>;
    count(options?: FindManyOptions<T>): Promise<number>;
    countBy(where: FindOptionsWhere<T> | FindOptionsWhere<T>[]): Promise<number>;
    average(columnName: PickKeysByType<T, number>, where?: FindOptionsWhere<T> | FindOptionsWhere<T>[]): Promise<number | null>;
    sum(columnName: PickKeysByType<T, number>, where?: FindOptionsWhere<T> | FindOptionsWhere<T>[]): Promise<number | null>;
    minimum(columnName: PickKeysByType<T, number>, where?: FindOptionsWhere<T> | FindOptionsWhere<T>[]): Promise<number | null>;
    maximum(columnName: PickKeysByType<T, number>, where?: FindOptionsWhere<T> | FindOptionsWhere<T>[]): Promise<number | null>;
    increment(where: FindOptionsWhere<T>, propertyPath: string, value: string | number): Promise<UpdateResult>;
    decrement(where: FindOptionsWhere<T>, propertyPath: string, value: string | number): Promise<UpdateResult>;
}
//# sourceMappingURL=solid-base.repository.d.ts.map