/** * SQL Statement Parser (v2 β€” dialect-aware PL/blocks) * * Splits a SQL script into individual statements, handling: * - String literals (single quotes with doubled-quote escape) * - Quoted identifiers (double quotes) * - Line comments (-- prefix) * - Block comments (slash-star ... star-slash) * - PL/SQL & PL/pgSQL BEGIN...END blocks (tracks depth, with END IF/LOOP/CASE lookahead) * - Oracle/DM standalone `/` block terminator * - PostgreSQL `$$ ... $$` DO blocks * - SQL Server `GO` statement separator * - MySQL DELIMITER directive * * v2 changes: * - END lookahead: `END IF` / `END LOOP` / `END CASE` / `END WHILE` 不减 depth * - Oracle `/` standalone terminator (line containing only `/`) * - PostgreSQL `$$` dollar-quoted block * - SQL Server `GO` standalone terminator * - All gated by dialect parameter so non-applicable dialects skip these */ import type { DbType } from './adapter-factory.js'; /** * Split a SQL script into individual statements. * Returns array of statements (may include empty strings as trailing artifacts). */ export declare function splitStatements(script: string, dialect?: DbType): string[]; //# sourceMappingURL=sql-parser.d.ts.map