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

v0.9.1

Compare
Choose a tag to compare
@nwronski nwronski released this 14 Jul 04:15
· 223 commits to master since this release

Changed

  • sqlite-parser is now completely free of runtime dependencies as promise has been removed as a dependency. you can still use the library as a promise-based module, but you have to include and require('promise') manually.

    // Promise-based usage
    var Promise         = require('promise'),
        sqliteParser    = Promise.denodeify(require('sqlite-parser'));
    sqliteParser("SELECT * FROM bees")
    .then(function (res) {
      // Result AST
      console.log(res);
    }, function (err) {
      // Error
      console.log(err);
    });
    // Standard usage
    var sqliteParser    = require('sqlite-parser');
    sqliteParser("SELECT * FROM bees", function (err, res) {
      if (err) {
        // Error
        console.log(err);
      } else {
        // Result AST
        console.log(res);
      }
    });
  • forked pegjs repository as nwronski/pegjs to get the changes into pegjs core into version control so they are not accidentally overwritten

  • getting closer to displaying correct error location when there are multiple statements in the input SQL

  • removed private flag in package.json ahead of first published release

  • pulled out last remnants of promise from core sqlite-parser lib

Notes

  • Even though the Tracer is now pretty good at pinpointing where a SyntaxError occurred, it is still removing CREATE TABLE node when there is a failure in the statement, even though that information should be part of the error message.