
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
js-sql-parser
Advanced tools
parse / stringify sql (select grammar) in js.
sql grammar follows https://dev.mysql.com/doc/refman/5.7/en/select.html
using ' & " for column alias?
since v1.4.1 #40, #44having
since v1.2.1. #29for more changes see CHANGELOG
npm install --save js-sql-parser
const parser = require('js-sql-parser');
const ast = parser.parse('select * from dual');
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
<script src="./dist/parser/sqlParser.js"><script/>
var sqlParser = window.sqlParser;
var ast = sqlParser.parse('select * from dual');
var sql = sqlParser.stringify(ast);
...
npm run build
to build the distributable.MIT
FAQs
> parse / stringify sql (select grammar) in js.
We found that js-sql-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.