import { QueryPropertyMetaData } from "@itwin/core-common";
import { IModelDb } from "./IModelDb";
import { IModelJsNative } from "@bentley/imodeljs-native";
import { ECDb } from "./ECDb";
/**
 * Executes ECSql queries one row at a time against an IModelDb, maintaining statement state between
 * successive calls so the caller can page through results via offset-based requests.
 * @internal
 */
export declare class ECSqlRowExecutor implements Disposable {
    private readonly _db;
    private _stmt;
    private _removeListener;
    constructor(_db: IModelDb | ECDb);
    /** Disposes the current statement and resets all internal state.
     * Invoked when the db signals that the executor must be recycled.
     * @internal
     */
    private cleanup;
    /** Call this function to dispose the row executor off.
     * @internal
     */
    [Symbol.dispose](): void;
    /** Prepare the statement and bind parameters in one step.
     * Call once during reader initialization — avoids the per-row `ensureStatementReady` check.
     * @param query - The ECSql text to prepare.
     * @param args - Optional bind parameters.
     * @throws IModelError on preparation or binding failure.
     * @internal
     */
    prepareAndBind(query: string, args?: object): void;
    /** Fast-path: step the cursor once and return row data directly.
     *
     * Returns the row data array if a row is available.
     * Returns `undefined` if the result set is exhausted (DONE).
     *
     * This avoids all intermediate object allocations (StepResult, RowDataResult,
     * DbRuntimeStats, DbQueryResponse) that the general `execute()` path creates per row.
     *
     * @param options - Native row-adaptor options (should be cached and reused across rows).
     * @throws IModelError on step failure or row extraction failure.
     * @internal
     */
    stepNextRow(options: IModelJsNative.ECSqlRowAdaptorOptions): any;
    /** Get column metadata directly from the prepared statement.
     * Call once after `prepareAndBind` — the metadata does not change between rows.
     * @param options - Native row-adaptor options that influence property naming.
     * @returns Array of column metadata.
     * @internal
     */
    fetchMetadata(options: IModelJsNative.ECSqlRowAdaptorOptions): QueryPropertyMetaData[];
    /** Prepares the ECSql statement against the native database and records the elapsed preparation time.
     * @param ecsql - The ECSql text to prepare.
     * @returns An `OperationResult` indicating success or failure.
     * @internal
     */
    private prepareStmt;
    /** Resets the statement and binds the given parameter values. Caches the arguments for later
     * comparison so that redundant rebinds can be skipped.
     * @param args - The parameter object to bind, or `undefined` when no parameters are needed.
     * @returns An `OperationResult` indicating success or failure.
     * @internal
     */
    private bindValues;
}
//# sourceMappingURL=ECSqlRowExecutor.d.ts.map