Skip to content

nickdeis/alasql-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alasql-loader

Compiles sql from alasql and emits a JSON of the db. Currently is extremely naive (see Why?) and not nearly complete.

Usage

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"}]);

License

MIT

Why?

  • Compile time checking is useful
  • To see if I can cut out the clientside parser

Limitations/TODO

  • SELECT statements don't work

About

alasql webpack transpiler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published