import { PromptTemplate } from '@langchain/core/prompts'; import { LangGraphRunnableConfig } from '@langchain/langgraph'; import { IGraphNode } from '../../../graphs'; import { LLMProvider } from '../../../types'; import { DbSchemaHelperService } from '../services'; import { DbQueryState } from '../state'; import { DbQueryConfig } from '../types'; export declare class FixQueryNode implements IGraphNode { private readonly llm; private readonly config; private readonly schemaHelper; fixPrompt: PromptTemplate\nYou are an expert AI assistant that fixes SQL query errors.\nYou are given a SQL query that has validation errors related to specific tables.\nYour task is to fix ONLY the parts of the query related to the listed error tables.\nDO NOT change any part of the query that does not involve the error tables.\nPreserve the overall structure, logic, and all other table references exactly as they are.\n\nRules:\n- Only modify clauses, joins, columns, or conditions that involve the error tables.\n- Do not add, remove, or reorder columns or tables that are not related to the error.\n- Do not change aliases, formatting, or logic for unrelated parts of the query.\n- **DO NOT make any DML statements** (INSERT, UPDATE, DELETE, DROP etc.) to the database.\n- Use the provided schema for the error-related tables to write correct SQL.\n- The dialect is {dialect}.\n\n\n\n{question}\n\n\n\n{currentQuery}\n\n\n\n{errorSchema}\n\n\n\n{errorFeedback}\n\n\n{checks}\n\n{historicalErrors}\n\n\nOutput should only be a valid SQL query with no other special character or formatting.\nContains the required valid SQL with the error fixed.\nIt should have no other character or symbol or character that is not part of SQLs.\n">, any>; constructor(llm: LLMProvider, config: DbQueryConfig, schemaHelper: DbSchemaHelperService); execute(state: DbQueryState, config: LangGraphRunnableConfig): Promise; private trimSchema; private buildChecks; }