/**
 * Query Logger
 * Tracks database query execution with parameters, duration, and context
 */
import type { QueryLogEntry } from './types';
/**
 * QueryLogger tracks all database queries executed during a request context
 * Provides N+1 detection heuristic by flagging identical queries executed 5+ times
 */
export type QueryLoggerInstance = IQueryLogger;
export interface IQueryLogger {
    /**
     * Set current request context ID
     */
    setContext(context: string): void;
    /**
     * Get current request context ID
     */
    getContext(): string;
    /**
     * Log a query execution
     */
    logQuery(sql: string, params: unknown[], duration: number, context?: string): void;
    /**
     * Get query log for a context
     */
    getQueryLog(context?: string): QueryLogEntry[];
    /**
     * Get query summary (grouped by SQL) for a context
     */
    getQuerySummary(context?: string): Map<string, QueryLogEntry & {
        executionCount: number;
    }>;
    /**
     * Get N+1 suspects (queries executed 5+ times in same context)
     */
    getN1Suspects(context?: string, threshold?: number): QueryLogEntry[];
    /**
     * Clear logs for a context
     */
    clear(context?: string): void;
    /**
     * Get all logs
     */
    getAllLogs(): Map<string, QueryLogEntry[]>;
    /**
     * Get total query count for a context
     */
    getQueryCount(context?: string): number;
    /**
     * Get total duration for all queries in a context
     */
    getTotalDuration(context?: string): number;
}
/**
 * QueryLogger tracks all database queries executed during a request context
 * Provides N+1 detection heuristic by flagging identical queries executed 5+ times
 * Sealed namespace for immutability
 */
export declare const QueryLogger: Readonly<{
    logs: Map<string, QueryLogEntry[] | undefined>;
    getInstance(): IQueryLogger;
    /**
     * Set current request context ID
     */
    setContext(context: string): void;
    /**
     * Get current request context ID
     */
    getContext(): string;
    /**
     * Log a query execution
     */
    logQuery(sql: string, params: unknown[], duration: number, context?: string): void;
    /**
     * Get query log for a context
     */
    getQueryLog(context?: string): QueryLogEntry[];
    /**
     * Get query summary (grouped by SQL) for a context
     */
    getQuerySummary(context?: string): Map<string, QueryLogEntry & {
        executionCount: number;
    }>;
    /**
     * Get N+1 suspects (queries executed 5+ times in same context)
     * Simple heuristic: identical queries executed many times suggests N+1
     */
    getN1Suspects(context?: string, threshold?: number): QueryLogEntry[];
    /**
     * Clear logs for a context
     */
    clear(context?: string): void;
    /**
     * Get all logs
     */
    getAllLogs(): Map<string, QueryLogEntry[]>;
    /**
     * Get total query count for a context
     */
    getQueryCount(context?: string): number;
    /**
     * Get total duration for all queries in a context
     */
    getTotalDuration(context?: string): number;
}>;
//# sourceMappingURL=QueryLogger.d.ts.map