Flora SQL Parser is a JavaScript library for parsing SQL SELECT statements into abstract syntax trees (AST) and converting ASTs back to SQL. The current stable version is 0.10.1, released intermittently with no fixed cadence. It is based on the SQL parser from Alibaba's nquery module and focuses on SELECT statements, with limited support for other DML statements. It supports ANSI SQL and requires Node.js >= 6. Unlike more comprehensive parsers like sqlite-parser or node-sql-parser, it is lighter but with narrower scope.
npm install qh-flora-sql-parserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a SELECT SQL statement into an AST and converts it back to SQL, demonstrating round-trip parsing.
Use another library (e.g., node-sql-parser) for full DML support.
Set MySQL sql_mode to 'ANSI' before executing generated queries.
Use https://github.com/qing-hai/flora-sql-parser
Wrap parse() in try-catch.
Use import { Parser } from 'flora-sql-parser' or const { Parser } = require('flora-sql-parser').Ensure input is a valid SELECT statement. For other DML, use a different parser.
Run npm install flora-sql-parser and verify import path.
No dependency data recorded yet.