|
1 | 1 | # sqlite-parser |
2 | 2 |
|
| 3 | +[](https://github.com/codeschool/sqlite-parser/) |
| 4 | +[](https://github.com/codeschool/sqlite-parser/) |
| 5 | +[](https://www.npmjs.com/package/sqlite-parser) |
| 6 | + |
3 | 7 | This library takes SQL queries, provided as a string, and generates an |
4 | 8 | AST. An error will be generated describing what is malformed in the source query |
5 | 9 | code if the AST cannot be generated. |
6 | 10 |
|
7 | 11 | **This parser is written against the [SQLite 3 spec](https://www.sqlite.org/lang.html).** |
8 | 12 |
|
9 | | -Note: this project is work-in-progress and is **not fully spec-compliant**. |
| 13 | +## Install |
10 | 14 |
|
11 | | -The parser implements the basic components of the SQLite 3 spec, such as: |
12 | | -- Basic query types `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `DROP`, `CREATE`, etc... |
13 | | -- Sub-queries `SELECT FROM (SELECT * FROM b)` |
14 | | -- Aliases `SELECT * FROM apples AS a` |
15 | | -- `JOIN` types `INNER`, `OUTER`, `LEFT` |
16 | | -- Query modifiers `WHERE`, `GROUP BY`, `HAVING` |
| 15 | +``` |
| 16 | +npm install sqlite-parser |
| 17 | +``` |
17 | 18 |
|
18 | 19 | ## Demo |
19 | 20 |
|
20 | | -There interactive demo of the parser hosted |
| 21 | +There is an interactive demo of the parser hosted |
21 | 22 | [at this location](http://codeschool.github.io/sqlite-parser/demo/). The source |
22 | 23 | for the interactive demo exists in the `demo/` folder of this repository. You |
23 | | -can serve a LiveReload version of the demo on your local machine by running |
| 24 | +can serve up a LiveReload version of the demo on your local machine by running |
24 | 25 | `grunt live`. |
25 | 26 |
|
26 | | -## Install |
27 | | - |
28 | | -``` |
29 | | -npm install sqlite-parser |
30 | | -``` |
31 | | - |
32 | 27 | ## Usage |
33 | 28 |
|
34 | 29 | The library exposes a function that accepts two arguments: a string |
|
0 commit comments