TSParser (v1.0.2) is a lightweight SQL parser that splits multi-statement SQL queries into individual statements. Supports MySQL, PostgreSQL, and Microsoft SQL Server. Handles stored procedures, functions, views, and custom delimiters (semicolon for MySQL/PG, GO for MSSQL). Ships TypeScript definitions. Maintained by TeamSQL. A viable alternative to sql-parser or node-sql-parser for multi-statement splitting without full AST support.
npm install tsparserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parse a multi-statement MySQL query into an array of individual SQL statements.
Ensure dbType is exactly 'mysql', 'pg', or 'mssql'.
Use 'GO' as delimiter for MSSQL.
Validate SQL separately if needed.
Use import { TSParser } from 'tsparser'.Run 'npm install tsparser' and ensure import path is 'tsparser' (case-sensitive).
Use 'mysql' instead of 'MySQL'.
No dependency data recorded yet.