import { type Repository } from '../../db/index.js';
import type { BetterSqlite3Database, CodegraphConfig } from '../../types.js';
/**
 * Open a readonly DB connection, run `fn`, and close the DB on completion.
 * Eliminates the duplicated `openReadonlyOrFail` + `try/finally/db.close()` pattern
 * that appears in every analysis query function.
 */
export declare function withReadonlyDb<T>(customDbPath: string | undefined, fn: (db: BetterSqlite3Database) => T): T;
/**
 * Open a Repository (native-first, falling back to better-sqlite3), run `fn`,
 * and close on completion. Mirrors `withReadonlyDb` but routes queries through
 * the native Rust engine when available.
 */
export declare function withRepo<T>(customDbPath: string | undefined, fn: (repo: InstanceType<typeof Repository>) => T): T;
/**
 * Resolve common analysis options into a normalized form.
 * Shared across fn-impact, context, dependencies, and exports modules.
 */
export declare function resolveAnalysisOpts(opts: {
    noTests?: boolean;
    config?: CodegraphConfig;
}): {
    noTests: boolean;
    config: CodegraphConfig;
    displayOpts: Record<string, unknown>;
};
//# sourceMappingURL=query-helpers.d.ts.map