001package gudusoft.gsqlparser.ir.builder.common; 002 003import gudusoft.gsqlparser.EDbVendor; 004import gudusoft.gsqlparser.analyzer.v2.AnalyzerV2Config; 005import gudusoft.gsqlparser.ir.common.SourceAnchor; 006import gudusoft.gsqlparser.nodes.TParseTreeNode; 007 008import java.util.List; 009 010/** 011 * Interface for dynamic SQL analysis subsystem. 012 * <p> 013 * Implementations extract table and routine references from dynamic SQL 014 * strings found in stored procedures (EXECUTE IMMEDIATE, sp_executesql, 015 * EXEC(), PostgreSQL EXECUTE, etc.). 016 */ 017public interface DynamicSqlAnalyzer { 018 019 /** 020 * Analyzes a dynamic SQL occurrence and extracts references. 021 * 022 * @param vendor database vendor for parsing the inner SQL 023 * @param sourceNode AST node containing the dynamic SQL (for anchor) 024 * @param sqlText the dynamic SQL text (may be literal, variable, or expression) 025 * @param owningRoutineId the routine ID that contains this dynamic SQL 026 * @param config analyzer configuration 027 * @return list of extraction results (one per parseable SQL statement) 028 */ 029 List<DynamicSqlExtraction> analyze( 030 EDbVendor vendor, TParseTreeNode sourceNode, 031 String sqlText, String owningRoutineId, 032 AnalyzerV2Config config); 033}