A lexer and parser for basic SQL SELECT queries, written in JavaScript using JISON. This package is a fork of Forward's SQL Parser, with added support for hyphens in literals. It tokenizes SQL strings into a stream of tokens and parses them into a Select object with properties for where, group, order, and limit. Version 1.0.1 is the current stable release. It only supports basic SELECT statements and lacks full SQL coverage. The package is primarily intended for Node.js environments and requires CoffeeScript for building from source.
npm install rw-sql-parserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows lexer tokenization and parser AST generation for a basic SELECT query.
Use a more complete SQL parser like `node-sql-parser` for full SQL support.
Access token type via index 0, value via index 1.
Run `npm install && cake build` if installing from source.
Run `npm install rw-sql-parser` and ensure it's in node_modules.
Use `import { lexer } from 'rw-sql-parser';`Restrict to basic SELECT with WHERE, GROUP BY, ORDER BY, LIMIT.
No dependency data recorded yet.