import { SqlEngine } from '../models/SqlEngine'; /** * Split a multi-statement SQL script into individual executable statements. * * Single-pass tokenizer: splits on top-level ';' (separator dropped) while skipping * separators inside single-quoted strings (with '' escape), double-quoted identifiers * (with "" escape), `--` line comments and block comments. Comments are preserved in * the statement text (Oracle hint comments matter). Statements are trimmed; empties dropped. * * Engine extras: * - 'oracle': a line consisting solely of '/' flushes the current statement (PL/SQL block * terminator), and ';' splitting is suppressed inside a BEGIN..END body — including the * block-closing ';', which stays in the text so `BEGIN ... END;` executes as-is. * `END IF`/`END LOOP`/`END CASE` close inner constructs, not the block. * - 'mssql': a line consisting solely of 'GO' (case-insensitive) flushes the current statement. * * Known limits: no $$ dollar-quoting (Postgres), no nested block comments, no MySQL * DELIMITER directives, no T-SQL bracket-quoted ';', and for Oracle no bare-END CASE * expressions inside blocks nor DECLARE-section ';' suppression before the BEGIN keyword. */ export declare function splitSqlScript(sqlText: string, engine?: SqlEngine): string[];