import type { AST } from '../../zero-protocol/src/ast.ts';
import type { Schema } from '../../zero-schema/src/builder/schema-builder.ts';
import type { ServerSchema } from '../../zero-schema/src/server-schema.ts';
import type { Format } from '../../zql/src/ivm/view.ts';
import type { DBTransaction, SchemaQuery } from '../../zql/src/mutate/custom.ts';
import type { QueryDelegate } from '../../zql/src/query/query-delegate.ts';
import { AbstractQuery, newQuerySymbol } from '../../zql/src/query/query-impl.ts';
import type { HumanReadable, PullRow } from '../../zql/src/query/query.ts';
import type { TypedView } from '../../zql/src/query/typed-view.ts';
export declare function makeSchemaQuery<S extends Schema>(schema: S): (dbTransaction: DBTransaction<unknown>, serverSchema: ServerSchema) => SchemaQuery<S>;
export declare class ZPGQuery<TSchema extends Schema, TTable extends keyof TSchema['tables'] & string, TReturn = PullRow<TTable, TSchema>> extends AbstractQuery<TSchema, TTable, TReturn> {
    #private;
    constructor(schema: TSchema, serverSchema: ServerSchema, tableName: TTable, dbTransaction: DBTransaction<unknown>, ast: AST, format: Format);
    protected [newQuerySymbol]<TSchema extends Schema, TTable extends keyof TSchema['tables'] & string, TReturn>(_delegate: QueryDelegate | undefined, schema: TSchema, tableName: TTable, ast: AST, format: Format): ZPGQuery<TSchema, TTable, TReturn>;
    run(): Promise<HumanReadable<TReturn>>;
    preload(): {
        cleanup: () => void;
        complete: Promise<void>;
    };
    materialize(): TypedView<HumanReadable<TReturn>>;
}
//# sourceMappingURL=query.d.ts.map