1.0.4 • Published 6 years ago

node-sqlparser v1.0.4

Weekly downloads
1,839
License
GPL-2.0
Repository
github
Last release
6 years ago

node-sqlparser

======

node-sqlparser, write in javascript

Install

NodeJS Version 0.8.0+

npm install node-sqlparser

Introduction

for the test , type the command:

make test

Usage

static function

var sql = 'select * from tablea where field1 = 0';
var parse = require('node-sqlparser').parse;
var stringify = require('node-sqlparser').stringify;
var astObj = parse(sql);

var sqlstr = stringify(astObj);

using ast

var AST = require('node-sqlparser');

var ast = new AST();
ast.parse(sql);

ast.stringify();

Acknowledgements