v0.8.0
Added
- additional rule descriptions in
grammar.pegjs
- added several array methods (e.g.:
findLast()
,takeRight()
,pluck()
) so that I could removelodash
as a dependency of the "smart error"Tracer
class
Changed
- updated grammar to remove all dependence on
modifier
clause as it was being used as a catch-all clause for stray parts of statements - created
defer
clause - normalized format for common clauses and nodes across different statement types
- removed
range
variant that was part ofBETWEEN
expressions - renamed several clauses to match the SQL keywords and/or SQLite manual descriptions used to define them
- for
WITHOUT ROWID
inCREATE TABLE
:modifier
->optimization
- for
IF NOT EXISTS
in all places:modifier
:condition
- for
- cleaned up css in the interactive demo
- removed
lodash
dependency in coreTracer
.lodash
is now only adevDependency
again!
Fixed
-
fixed error reporting when there is more than one statement in the input SQL.
- still need to make sure previous tree is not used if a subsequent statement has an error at the highest level
SELECT * FROM cats; SELECT * d
-
fixed rules for double-quoted, backticked, and bracketed identifiers to allow for escapes, leading or trailing spaces, and the full character set that is legal for quoted identifiers, where allowed.
-
fixed datatype names that did not display correctly in generated AST. fixed string literal definition to allow all possible input
-
fixed value format for direction key in
PRIMARY KEY
table conatrainsts -
do not show parenthesis in error message for syntax error when there is nothing to put inside them.
-
fixes for css in demo. for example, demo layout off by 1px when at smallest resolution, did a lot of cleanup on demo styles, responsive layout, error notification. also, changed error message format for smart errors.
Notes
- to support the "smart errors" changes were made to the
pegjs
library code inlib/compiler/passes/generate-javascript.js
. this was done to allowTracer
to get thedescription
names for the rules that are referenced in the error messages. will need to forkpegjs
to get the changes topegjs
core into version control so they are not accidentally overwritten. - considering removing the
promise
dependency from the coresqlite-parser
library beforev1.0.0
, as well, so that the parser can be dependency free as a standalone library. people could choose to "promisify" the parser or just use it synchronously instead of being forced to bundle thepromise
dependency when bundling this package for use in the browser. It actually looks like all the evergreen browsers except IE currently support a nativePromise
implementation, so having a non-nativePromise
implementation as a dependency will probably be obsolete pretty soon.