Compiles sql from alasql and emits a JSON of the db. Currently is extremely naive (see Why?) and not nearly complete.
SOURCE "./TEST_LOAD.sql";
INSERT INTO TEST_LOAD VALUES (1,'B');
CREATE TABLE TEST_TABLE (
X INT,
Y TEXT
);
INSERT INTO TEST_TABLE VALUES (1,'A');
var db = require("alasql!./TEST_TABLE.sql");
alasql.databases.alasql = db;
assert.deepEqual(alasql("SELECT * FROM TEST_TABLE"),[{X:1,Y:"A"}]);
MIT
- Compile time checking is useful
- To see if I can cut out the clientside parser
- SELECT statements don't work