import { Schema } from '@based/schema';
import { CreateObj } from './modify/create.js';
import { ModifyCtx } from './flushModify.js';
import { BasedDbQuery, QueryByAliasObj } from './query/BasedDbQuery.js';
import { ModifyRes } from './modify/ModifyRes.js';
import { TransformFns } from '../server/migrate/index.js';
import { ModifyOpts } from './modify/types.js';
import { SubStore } from './query/subscription/index.js';
import { DbShared } from '../shared/DbBase.js';
import { DbClientHooks } from '../hooks.js';
import { SchemaChecksum } from '../schema.js';
type DbClientOpts = {
    hooks: DbClientHooks;
    maxModifySize?: number;
    flushTime?: number;
    debug?: boolean;
};
export declare class DbClient extends DbShared {
    constructor({ hooks, maxModifySize, flushTime, debug, }: DbClientOpts);
    subs: Map<BasedDbQuery, SubStore>;
    hooks: DbClientHooks;
    flushTime: number;
    flushReady: () => void;
    flushIsReady: Promise<void>;
    writeTime: number;
    isDraining: boolean;
    modifyCtx: ModifyCtx;
    maxModifySize: number;
    upserting: Map<number, {
        o: Record<string, any>;
        p: Promise<number | ModifyRes>;
    }>;
    schemaIsSet(): Promise<void>;
    setSchema(schema: Schema, transformFns?: TransformFns): Promise<SchemaChecksum>;
    create(type: string, obj?: CreateObj, opts?: ModifyOpts): ModifyRes;
    copy(type: string, target: number | ModifyRes, objOrTransformFn?: Record<string, any> | ((item: Record<string, any>) => Promise<any>)): Promise<ModifyRes>;
    query(type: string, id?: number | ModifyRes | (number | ModifyRes)[] | QueryByAliasObj | QueryByAliasObj[] | Uint32Array): BasedDbQuery;
    query(): BasedDbQuery;
    update(type: string, id: number | ModifyRes, value: any, opts?: ModifyOpts): ModifyRes;
    update(type: string, value: Record<string, any> & {
        id: number | ModifyRes;
    }, opts?: ModifyOpts): ModifyRes;
    update(value: Record<string, any>, opts?: ModifyOpts): ModifyRes;
    upsert(type: string, obj: Record<string, any>, opts?: ModifyOpts): Promise<any>;
    delete(type: string, id: number | ModifyRes): ModifyRes;
    expire(type: string, id: number | ModifyRes, seconds: number): void;
    destroy(): void;
    stop(): void;
    drain(): Promise<number>;
    isModified(): Promise<void>;
}
export {};
