node-sqlparser

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i node-sqlparser

Weekly Downloads

2,698

Version

1.0.4

License

GPL-2.0

Unpacked Size

262 kB

Total Files

13

Last publish

Collaborators

  • fish