import type { SqlExpr } from "../tools/search/types.js";
import type { App } from "./app.js";
import type { Collection } from "./collection_model.js";
export type RecordQueryBuilder = {
    AndWhere(expr: SqlExpr | Record<string, unknown>): void;
};
export type RecordQueryFilter = (q: RecordQueryBuilder) => Error | null;
export declare function buildRecordFilterExpr(filters: Array<RecordQueryFilter | null | undefined>): SqlExpr | null;
export declare function combineSqlExprs(exprs: Array<SqlExpr | Record<string, unknown> | null | undefined>): SqlExpr | null;
export declare class RecordQuery {
    #private;
    constructor(app: App, collectionModelOrIdentifier: Collection | string | null | undefined);
    Where(expr: SqlExpr | Record<string, unknown>): this;
    AndWhere(expr: SqlExpr | Record<string, unknown>): this;
    OrderBy(expr: string): this;
    Limit(limit: number): this;
    Offset(offset: number): this;
    One(target?: unknown): unknown;
    All(target?: unknown[]): unknown[];
}
