Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.06 KB

README.md

File metadata and controls

58 lines (38 loc) · 1.06 KB

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