Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit 32d3de4

Browse files
committed
removed Tracer class from core library because of the severe performance hit it was causing. will leave it out or create a new branch to develop it further and get it to a place it can be more performant. refs #2
1 parent 10fdc52 commit 32d3de4

13 files changed

Lines changed: 4210 additions & 31053 deletions

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
All notable changes to this project will be documented in this file.
33

44
## [Unreleased][unreleased]
5+
6+
## [v0.10.0] - 2015-07-09
57
### Added
68
- rules and AST for missing transaction-related statement types: `RELEASE` and `SAVEPOINT`
79
- rules and AST for missing SQLite-specific statement types: `PRAGMA`, `DETACH`, `VACUUM`, `ANALYZE`, and `REINDEX`
@@ -11,6 +13,9 @@ All notable changes to this project will be documented in this file.
1113
- added new methods in `parser-util.js` to reduce repeated code: `keyify()`, `textMerge()`, and `listify()`
1214

1315
### Changed
16+
- **removing Tracer class from sqlite-parser until a faster solution is developed**
17+
- Tracer is causing a **14x performance hit** to the sqlite-parser specs when it is enabled
18+
- might consider having two different builds: one _smart error_ build with Tracer and another _performance_ build for speed
1419
- fixed rules for `WITH` clause prepended to CRUD-type statements to make sure the `with` property is added to the correct nodes
1520
- changed the AST for `WITH` clause to no longer have a node of `type` `"with"`
1621

@@ -88,6 +93,7 @@ All notable changes to this project will be documented in this file.
8893
- several property values are now being normalized to lowercased strings instead of being passed unmodified to the AST. for example, the `action` property of `action` node now contains a lowercased value.
8994
- removed redundant rules that pointed to `name` rule, such as `name_function`, `name_view`, and `name_trigger`.
9095
- unquoted identifiers are now normalized to lowercased strings as per the SQL-92 standard. quoted identifiers are not normalized.
96+
- SQLite functions are now normalized to lowercase strings in the output AST.
9197
- now preventing FOUC when first loading the demo page. also allowing cursor focus on "Syntax Tree" editor so that the contents can be selected and copied to the clipboard.
9298

9399
## [v0.9.8] - 2015-07-06
@@ -414,7 +420,8 @@ fixed value format for direction key in PRIMARY KEY table contrainsts cleaned up
414420
### Added
415421
- First working version of sqlite-parser
416422

417-
[unreleased]: https://github.com/codeschool/sqlite-parser/compare/v0.9.8...HEAD
423+
[unreleased]: https://github.com/codeschool/sqlite-parser/compare/v0.10.0...HEAD
424+
[v0.10.0]: https://github.com/codeschool/sqlite-parser/compare/v0.9.8...v0.10.0
418425
[v0.9.8]: https://github.com/codeschool/sqlite-parser/compare/v0.9.1...v0.9.8
419426
[v0.9.1]: https://github.com/codeschool/sqlite-parser/compare/v0.8.0...v0.9.1
420427
[v0.8.0]: https://github.com/codeschool/sqlite-parser/compare/v0.6.0...v0.8.0

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ module.exports = function(grunt) {
7070
options: {
7171
failOnError: true
7272
},
73-
command: './node_modules/.bin/pegjs --trace src/grammar.pegjs lib/parser.js'
73+
command: './node_modules/.bin/pegjs --optimize "speed" src/grammar.pegjs lib/parser.js'
7474
},
7575
test: {
7676
options: {

README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ sqliteParser(sampleSQL, function (err, res) {
4747
});
4848
```
4949

50-
## Syntax Errors
51-
52-
This parser uses the `--trace` flag exposed in `pegjs` to create "smart" error
53-
messages. The parser includes a `Trace` class that keeps track of which grammar
54-
rules were being traversed just prior to the error and uses that information
55-
to improve the error message and location information.
56-
5750
## AST
5851

5952
**NOTE: The SQLite AST is a work-in-progress and subject to change.**

demo/js/sqlite-parser-demo.js

Lines changed: 11 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sqlite-parser-min.js

Lines changed: 5 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)