Skip to content

Deprecated toy project based on steveyen/sqld3

Notifications You must be signed in to change notification settings

peg-parser/sql.pegjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql.pegjs

THIS PROJECT IS DEPRECATED, PLEASE FORK YOUR OWN

[WARN]https://github.com/steveyen/sqld3 seems just a toy, so do not use both projects of us.

This project is a SQL parser based on PEG(parsing expression grammar).

And the sql.pegjs file is modified from https://github.com/steveyen/sqld3.

Thanks for the effort of @steveyen.

Usage

var parser = require('sql.pegjs');
var sql = 'select * from users;';
parser.parse(sql)
// => [{"stmt":"select","select_cores":[{"results":[{"column":"*"}],"from":[{"table":"users"}]}]}]);

How to contribute

  1. modify lib/sql.pegjs and add tests.

  2. run make build

  3. then run make test

License

MIT

About

Deprecated toy project based on steveyen/sqld3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.5%
  • Makefile 5.5%