import { type EntityFields } from '../database/entity';
import { type EntityClass } from '../database/metadata';
import type { FilterRecord, FilterValue, PatchRecord, QueryMutationResult } from '../database/query';
import type { ClassType } from '../types';
export declare class SqlTestingHelper {
    private rows;
    mockEntity<T extends object>(entityClass: ClassType<T>, data: Partial<EntityFields<T>>[] | Partial<EntityFields<T>>): void;
    clearMocks(): void;
    hasMock(entityClass: ClassType): boolean;
    createQuery<T extends object>(entityClass: EntityClass<T>): InMemoryQueryBuilder<T>;
}
declare class InMemoryQueryBuilder<T extends object> {
    private readonly entityClass;
    private readonly rows;
    private filters;
    private selected?;
    private order;
    private limitValue?;
    private offsetValue?;
    constructor(entityClass: EntityClass<T>, rows: Record<string, unknown>[]);
    filter(filter: FilterRecord): this;
    filterField(field: keyof T | string, value: FilterValue): this;
    select(...fields: string[]): this;
    orderBy(field: string, direction?: 'asc' | 'desc' | 'ASC' | 'DESC' | 1 | -1): this;
    sort(field: string | Record<string, 'asc' | 'desc' | 'ASC' | 'DESC' | 1 | -1>, direction?: 'asc' | 'desc' | 'ASC' | 'DESC' | 1 | -1): this;
    limit(limit: number): this;
    offset(offset: number): this;
    skip(offset: number): this;
    find(): Promise<T[]>;
    findField<K extends keyof T>(field: K): Promise<T[K][]>;
    findOneFieldOrUndefined<K extends keyof T>(field: K): Promise<T[K] | undefined>;
    findOneField<K extends keyof T>(field: K): Promise<T[K]>;
    findOneOrUndefined(): Promise<T | undefined>;
    findOne(): Promise<T>;
    has(): Promise<boolean>;
    count(): Promise<number>;
    patchMany(patch: PatchRecord<T>): Promise<QueryMutationResult>;
    patchOne(patch: PatchRecord<T>): Promise<QueryMutationResult>;
    deleteMany(): Promise<QueryMutationResult>;
    deleteOne(): Promise<QueryMutationResult>;
    private applyPatch;
    private requirePrimaryKeyFilter;
    private applyQuery;
    private hydrate;
}
export {};
//# sourceMappingURL=sql.d.ts.map