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

Commit 6efc725

Browse files
committed
the following things no longer have an identifier node in the name property, as it is too redundant: column constraints, table constrains, column definitions. the parent node provides plenty of context itself for what you will find in its name property. refs #2
1 parent 32d3de4 commit 6efc725

9 files changed

Lines changed: 41 additions & 39 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
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+
### Changed
6+
- the following things no longer have an `identifier` node in the `name` property, as it is too redundant: column constraints, table constrains, column definitions. the parent node provides plenty of context itself for what you will find in its `name` property.
57

68
## [v0.10.0] - 2015-07-09
79
### Added

demo/js/sqlite-parser-demo.js

Lines changed: 11 additions & 11 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 & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sqlite-parser.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
}
1717
}
1818
sqliteParser['NAME'] = 'sqlite-parser';
19-
sqliteParser['VERSION'] = '0.10.0';
19+
sqliteParser['VERSION'] = '0.10.1';
2020

2121
module.exports = root.sqliteParser = sqliteParser;
2222
})(typeof self === 'object' ? self : global);
@@ -9810,7 +9810,7 @@ module.exports = (function() {
98109810

98119811
peg$silentFails++;
98129812
s0 = peg$currPos;
9813-
s1 = peg$parseid_column();
9813+
s1 = peg$parsename();
98149814
if (s1 !== peg$FAILED) {
98159815
s2 = peg$currPos;
98169816
s3 = peg$currPos;
@@ -9999,7 +9999,7 @@ module.exports = (function() {
99999999
if (s1 !== peg$FAILED) {
1000010000
s2 = peg$parsee();
1000110001
if (s2 !== peg$FAILED) {
10002-
s3 = peg$parseid_constraint_column();
10002+
s3 = peg$parsename();
1000310003
if (s3 !== peg$FAILED) {
1000410004
s4 = peg$parseo();
1000510005
if (s4 !== peg$FAILED) {
@@ -10485,7 +10485,7 @@ module.exports = (function() {
1048510485
if (s1 !== peg$FAILED) {
1048610486
s2 = peg$parsee();
1048710487
if (s2 !== peg$FAILED) {
10488-
s3 = peg$parseid_constraint_table();
10488+
s3 = peg$parsename();
1048910489
if (s3 !== peg$FAILED) {
1049010490
peg$savedPos = s0;
1049110491
s1 = peg$c8(s3);

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
}
1616
sqliteParser['NAME'] = 'sqlite-parser';
17-
sqliteParser['VERSION'] = '0.10.0';
17+
sqliteParser['VERSION'] = '0.10.1';
1818

1919
module.exports = root.sqliteParser = sqliteParser;
2020
})(typeof self === 'object' ? self : global);

lib/parser.js

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "sqlite-parser",
33
"description": "JavaScript implentation of SQLite 3 query parser",
44
"author": "Code School (http://codeschool.com)",
5-
"version": "0.10.0",
5+
"version": "0.10.1",
66
"contributors": [
77
"Nick Wronski <nick@javascript.com>"
88
],

src/grammar.pegjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ source_tbl_loop
16051605

16061606
/** {@link https://www.sqlite.org/syntaxdiagrams.html#column-def} */
16071607
source_def_column "Column Definition"
1608-
= n:( id_column ) ( !( name_char ) o ) t:( column_type )? o c:( column_constraints )?
1608+
= n:( name ) ( !( name_char ) o ) t:( column_type )? o c:( column_constraints )?
16091609
{
16101610
return util.extend({
16111611
'type': 'definition',
@@ -1642,7 +1642,7 @@ column_constraint "Column Constraint"
16421642
}
16431643

16441644
column_constraint_name "Column Constraint Name"
1645-
= CONSTRAINT e n:( id_constraint_column ) o
1645+
= CONSTRAINT e n:( name ) o
16461646
{ return n; }
16471647

16481648
column_constraint_types
@@ -1756,7 +1756,7 @@ table_constraint "Table Constraint"
17561756
}
17571757

17581758
table_constraint_name "Table Constraint Name"
1759-
= CONSTRAINT e n:( id_constraint_table )
1759+
= CONSTRAINT e n:( name )
17601760
{ return n; }
17611761

17621762
table_constraint_types

test/index-spec.js

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

0 commit comments

Comments
 (0)