parse / stringify sql (select grammar) in js.
sql grammar follows https://docs.dremio.com/sql-reference/
- Forked from js-dremio-sql-parser v1.3.0
for more changes see CHANGELOG
npm install --save js-dremio-sql-parser
const parser = require('js-dremio-sql-parser');
const ast = parser.parse('SELECT * FROM Samples."samples.dremio.com"."zips.json"');
console.log(JSON.stringify(ast, null, 2));
ast.value.selectItems.value[0].value = 'foo';
ast.value.from.value[0].value.value.value = 'bar';
console.log(parser.stringify(ast));
// SELECT foo FROM bar
- Run
npm run build
to build the distributable.
MIT