import type { DashboardStore } from './dashboard_store.js'; import type { HttpContext } from '@adonisjs/core/http'; import type { ApplicationService } from '@adonisjs/core/types'; /** * Reject SQL containing statement separators / comment sequences that could * enable stacked statements or comment-based injection into the EXPLAIN prefix. */ export declare function hasUnsafeSqlTokens(sqlText: string): boolean; export type DbDialect = 'pg' | 'sqlite' | 'mysql' | 'mssql' | 'unknown'; export interface AppDbClient { raw: (sql: string, bindings: unknown[]) => Promise; dialect: DbDialect; } /** Get the Lucid read client for running EXPLAIN. */ export declare function getAppDbClient(app: ApplicationService, connectionName?: string): Promise; /** Build the EXPLAIN SQL for the detected dialect. */ export declare function buildExplainSql(sql: string, dialect: DbDialect): string; /** Extract the plan from raw EXPLAIN result based on dialect. */ export declare function extractPlan(explainResult: unknown, dialect?: DbDialect): unknown[]; /** * Handle the EXPLAIN endpoint for a stored query. * * Extracted from DashboardController.queryExplain to reduce * complexity and function length. */ export declare function handleQueryExplain(dashboardStore: DashboardStore, app: ApplicationService, ctx: HttpContext): Promise;