An SQL lexer for JavaScript targeting standard SQL92, SQL2011, MySQL, and SQLite. Current stable version is 0.2.2. The library aims to produce tokens suitable for building parsers, syntax highlighters, and other SQL tooling. It is still early in development (pre-1.0), with Postgres support planned but not yet implemented. Differentiator: focuses on multiple SQL dialects (MySQL, SQLite) beyond standard SQL, intended as a base for higher-level tools like migration generators and schema translators. However, documentation and ecosystem are minimal, and the API may change significantly before a 1.0 release.
npm install sql-lexerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: tokenizing an SQL query using default export and SQL92 dialect lexer. Outputs token objects.
Pin to exact version and monitor releases for breaking changes.
Handle token objects: { type, value, start, end }.Use 'mysql' or 'sqlite' dialect, or wait for future release.
Check documentation before relying on advanced SQL features.
Use `import Lexer from 'sql-lexer'` or `const Lexer = require('sql-lexer').default`.Run `npm install sql-lexer` or check your package.json.
Verify SQL is valid for the dialect (e.g., MySQL vs SQL92) and upgrade to latest version.
No dependency data recorded yet.