A SQL compiler library for Node.js (version 1.0.2, latest) that tokenizes, parses, and generates SQL, allowing dynamic editing of the query AST. Releases are infrequent (no recent updates). Differentiators: provides a full pipeline (tokenizer, parser, code generator) and a manipulable AST, unlike pure SQL parsers. Requires Node >=15 (ESM-only). Not widely adopted; use with caution for production.
npm install sql-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a SQL SELECT query, manipulates the AST to add a column, and generates the updated SQL string.
Use exact import paths like 'sql-compiler/modules/tokenizer.mjs'.
Always tokenize first: parser(tokenizer(sql)).
Study the AST format in documentation before manipulating.
Currently limited to SELECT; avoid using for INSERT/UPDATE/DELETE.
import tokenizer from 'sql-compiler/modules/tokenizer.mjs';
import parser from 'sql-compiler/modules/parser/parser.mjs';
parser(tokenizer(sql)) and ensure tokenizer returns an array.
No dependency data recorded yet.