import type NodedbJson from '../database.js';
import type { IndexDefinition, MatchObject, PredicateFunction, QueryOptions, QueryOptionsWithSelect, QueryResult, QueryResultForOptions, UpdaterObject } from '../types/index.js';
export declare class Collection<T = any> {
    private readonly db;
    private readonly key;
    constructor(db: NodedbJson, key: string);
    all(): T[];
    insert(item: T | T[]): this;
    findOne(where: MatchObject<T> | PredicateFunction<T>): T | undefined;
    findMany(where?: MatchObject<T> | PredicateFunction<T>): T[];
    updateOne(where: MatchObject<T> | PredicateFunction<T>, updater: UpdaterObject<T>): this;
    deleteOne(where: MatchObject<T> | PredicateFunction<T>): this;
    query<TSelected extends Extract<keyof T, string>>(options: QueryOptionsWithSelect<T, TSelected>): QueryResult<Pick<T, TSelected>>;
    query<TOptions extends QueryOptions<T>>(options: TOptions): QueryResultForOptions<T, TOptions>;
    query(options?: QueryOptions<T>): QueryResult<T>;
    createIndex(indexDefinition: IndexDefinition<T>): this;
    private _toPredicate;
    private _matches;
}
