nickdeis / alasql-loader

alasql webpack transpiler
MIT License
3 stars 0 forks source link

Allow multiple SQL files, emit the DB once #1

Closed nickdeis closed 8 years ago

nickdeis commented 8 years ago

While I haven't figure out how to do this (probably a pitched loader like css-loader), there needs to be a way to load multiple sql files, and have the db emit once.

UPDATE: This is sort of solved by the alasql keyword SOURCE. Example

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');

Still, for the sake of teamwork sanity, a db should be a single module and emit once. UPDATE: This is apparently impossible, and isn't like the CSS loader problem. It seems that webpack way is to let minimization and the user handle it.

nickdeis commented 8 years ago

Closing issue