A MySQL parser that converts mysqldump output into an AST. Version 0.3.0 is the latest stable release, but the library is early-stage with limited feature coverage. It tokenizes SQL input into word, ident, punct, number, string, variable, and version tokens, and builds AST nodes for statements, actions, columns, indexes, rows, and more. Differentiated by its focus on mysqldump output and minimal dependencies. Development is infrequent; community contributions are welcome but not actively maintained.
npm install sql-astNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a CREATE TABLE statement from a SQL string and logs the resulting AST array as JSON.
Iterate over the array returned by parse() to access individual Statement nodes.
Do not rely on token positions for whitespace; use AST node positions for accurate source mapping.
Consider using more mature SQL parsers like node-sql-parser or sql.js for broader SQL support.
Install using `npm install sql-ast` and ensure CommonJS usage (require, not import).
Use `const { parse } = require('sql-ast');`No dependency data recorded yet.