import type { TracingChannel } from 'node:diagnostics_channel'; export interface QueryTraceContext { query: string; values: any; database: string; serverAddress: string; serverPort: number | undefined; } export interface ExecuteTraceContext { query: string; values: any; database: string; serverAddress: string; serverPort: number | undefined; } export interface ConnectTraceContext { database: string; serverAddress: string; serverPort: number | undefined; user: string; } export interface PoolConnectTraceContext { database: string; serverAddress: string; serverPort: number | undefined; } export declare const dc: typeof import('node:diagnostics_channel') | undefined; export declare const hasTracingChannel: boolean; export declare function shouldTrace( channel: TracingChannel | undefined | null ): boolean; export declare function traceCallback( channel: TracingChannel | undefined | null, fn: (...args: any[]) => any, position: number, contextFactory: () => T, thisArg: any, ...args: any[] ): any; export declare function tracePromise( channel: TracingChannel | undefined | null, fn: () => Promise, contextFactory: () => T ): Promise; export declare const queryChannel: | TracingChannel | undefined; export declare const executeChannel: | TracingChannel | undefined; export declare const connectChannel: | TracingChannel | undefined; export declare const poolConnectChannel: | TracingChannel | undefined; export declare function getServerContext(config: { socketPath?: string; host?: string; port?: number; }): { serverAddress: string; serverPort: number | undefined };