langpavel/node-sqljs — pull request #3 by substack (2013-12-04 20:23:05+00:00)
Title: add support for quoted identifiers

My friend @maxogden is working on a service to ingest SQL schemas and ran into some sql like this in the wild:

``` sql
CREATE TABLE "bees" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "name"
VARCHAR(50) NOT NULL, "products" VARCHAR(255), "effect" VARCHAR(50), "branch_id"
INTEGER NOT NULL, "mom_id" INTEGER, "dad_id" INTEGER, "notes" VARCHAR(255));
```

Looking around at the sql parsers on npm, this module appears to be the only one that can parse `create table` statements. Unfortunately, this statement didn't parse because of the quoting around the column names. The patch I've created adds supports for double quotes around identifiers to let the statement parse correctly. Thanks for the neat module!