alasql 4.0.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@
29
29
 
30
30
  AlaSQL - _( [à la](http://en.wiktionary.org/wiki/%C3%A0_la) [SQL](http://en.wikipedia.org/wiki/SQL) ) [ælæ ɛskju:ɛl]_ - is an open source SQL database for JavaScript with a strong focus on query speed and data source flexibility for both relational data and schemaless data. It works in the web browser, Node.js, and mobile apps.
31
31
 
32
- This library is designed for:
32
+ This library is perfect for:
33
33
 
34
34
  * Fast in-memory SQL data processing for BI and ERP applications on fat clients
35
35
  * Easy ETL and options for persistence by data import / manipulation / export of several formats
@@ -101,7 +101,7 @@ console.log(res); // [{a:2,b:6},{a:1,b:5},{a:3,b:4}]
101
101
  ```
102
102
 
103
103
 
104
- __If you are familiar with SQL it should come as no surprise that proper use of indexes on your tables is essential to get good performance.__
104
+ __If you are familiar with SQL, it should be no surprise that proper use of indexes on your tables is essential for good performance.__
105
105
 
106
106
 
107
107
 
@@ -1,7 +1,7 @@
1
- //! AlaSQL v4.0.0 build: develop-17e468d3 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
1
+ //! AlaSQL v4.0.1 build: develop-35e20d24 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 4.0.0
4
+ @version 4.0.1
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2023 Andrey Gershun & Mathias Wulff
@@ -1,2 +1,2 @@
1
- //! AlaSQL v4.0.0 build: develop-17e468d3 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
1
+ //! AlaSQL v4.0.1 build: develop-35e20d24 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
2
2
  !function(r,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():r.alasql=e()}(this,function(){function i(r,e,o){"function"==typeof(e=e||[])&&(scope=o,o=e,e=[]),"object"!=typeof e&&(e=[e]);var t=i.lastid++;i.buffer[t]=o,i.webworker.postMessage({id:t,sql:r,params:e})}var a;if(i.options={},i.options.progress=function(){},isArray=function(r){return"[object Array]"===Object.prototype.toString.call(r)},i.promise=function(){throw new Error("Please include a Promise/A+ library")},"undefined"!=typeof Promise&&(a=function(r,e,n,s){return new Promise(function(o,t){i(r,e,function(r,e){e?t(e):(n&&s&&!1!==i.options.progress&&i.options.progress(n,s),o(r))})})},i.promise=function(r,e){if("undefined"==typeof Promise)throw new Error("Please include a Promise/A+ library");if("string"==typeof r)return a(r,e);if(!isArray(r)||r.length<1||void 0!==e)throw new Error("Error in .promise parameters");var o=r;if(!(o.length<1)){for(var t,n,s=[],i=0;i<o.length;i++){if("string"==typeof(n=o[i])&&(n=[n]),!isArray(n)||n.length<1||2<n.length)throw new Error("Error in .promise parameter");t=n[0],n=n[1]||void 0,s.push(a(t,n,i,o.length))}return Promise.all(s)}}),i=i||!1)return i.worker=function(){throw new Error("Can find webworker in this enviroment")},"undefined"!=typeof Worker&&(i.worker=function(r,e,o){if(void 0===(r=!0===r?void 0:r))for(var t=document.getElementsByTagName("script"),n=0;n<t.length;n++){if("alasql-worker.js"===t[n].src.substr(-16).toLowerCase()){r=t[n].src.substr(0,t[n].src.length-16)+"alasql.js";break}if("alasql-worker.min.js"===t[n].src.substr(-20).toLowerCase()){r=t[n].src.substr(0,t[n].src.length-20)+"alasql.min.js";break}if("alasql.js"===t[n].src.substr(-9).toLowerCase()){r=t[n].src;break}if("alasql.min.js"===t[n].src.substr(-13).toLowerCase()){r=t[n].src.substr(0,t[n].src.length-13)+"alasql.min.js";break}}if(void 0===r)throw new Error("Path to alasql.js is not specified");var s;!1!==r?(s=(s="importScripts('")+r+"');self.onmessage = function(event) {alasql(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}",s=new Blob([s],{type:"text/plain"}),i.webworker=new Worker(URL.createObjectURL(s)),i.webworker.onmessage=function(r){var e=r.data.id;i.buffer[e](r.data.data),delete i.buffer[e]},i.webworker.onerror=function(r){throw r},1<arguments.length&&i("REQUIRE "+e.map(function(r){return'"'+r+'"'}).join(","),[],o)):!1===r&&delete i.webworker}),i.lastid=0,i.buffer={},i.worker(),i;throw new Error("alasql was not found")});
package/dist/alasql.fs.js CHANGED
@@ -1,7 +1,7 @@
1
- //! AlaSQL v4.0.0 build: develop-17e468d3 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
1
+ //! AlaSQL v4.0.1 build: develop-35e20d24 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 4.0.0
4
+ @version 4.0.1
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2023 Andrey Gershun & Mathias Wulff
@@ -142,8 +142,8 @@ var alasql = function(sql, params, cb, scope) {
142
142
  Current version of alasql
143
143
  @constant {string}
144
144
  */
145
- alasql.version = '4.0.0';
146
- alasql.build = 'develop-17e468d3';
145
+ alasql.version = '4.0.1';
146
+ alasql.build = 'develop-35e20d24';
147
147
 
148
148
  /**
149
149
  Debug flag
@@ -4317,7 +4317,7 @@ utils.findAlaSQLPath = function () {
4317
4317
  };
4318
4318
 
4319
4319
  var getXLSX = function () {
4320
- var XLSX = alasql.private.externalXlsxLib;
4320
+ var XLSX = alasql.private.externalXlsxLib || utils.global.XLSX || null;
4321
4321
 
4322
4322
  if (XLSX) {
4323
4323
  return XLSX;
@@ -4325,13 +4325,12 @@ var getXLSX = function () {
4325
4325
 
4326
4326
  if (utils.isNode || utils.isBrowserify || utils.isMeteorServer) {
4327
4327
  //*not-for-browser/*
4328
- XLSX = require('xlsx') || null;
4328
+ XLSX = require('../modules/xlsx/xlsx') || null;
4329
+ alasql.private.externalXlsxLib = XLSX;
4329
4330
  //*/
4330
- } else {
4331
- XLSX = utils.global.XLSX || null;
4332
4331
  }
4333
4332
 
4334
- if (null === XLSX) {
4333
+ if (!XLSX) {
4335
4334
  throw new Error('Please include the xlsx.js library');
4336
4335
  }
4337
4336
 
package/dist/alasql.js CHANGED
@@ -1,7 +1,7 @@
1
- //! AlaSQL v4.0.0 build: develop-17e468d3 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
1
+ //! AlaSQL v4.0.1 build: develop-35e20d24 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 4.0.0
4
+ @version 4.0.1
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2023 Andrey Gershun & Mathias Wulff
@@ -142,8 +142,8 @@ var alasql = function(sql, params, cb, scope) {
142
142
  Current version of alasql
143
143
  @constant {string}
144
144
  */
145
- alasql.version = '4.0.0';
146
- alasql.build = 'develop-17e468d3';
145
+ alasql.version = '4.0.1';
146
+ alasql.build = 'develop-35e20d24';
147
147
 
148
148
  /**
149
149
  Debug flag
@@ -4317,7 +4317,7 @@ utils.findAlaSQLPath = function () {
4317
4317
  };
4318
4318
 
4319
4319
  var getXLSX = function () {
4320
- var XLSX = alasql.private.externalXlsxLib;
4320
+ var XLSX = alasql.private.externalXlsxLib || utils.global.XLSX || null;
4321
4321
 
4322
4322
  if (XLSX) {
4323
4323
  return XLSX;
@@ -4325,13 +4325,12 @@ var getXLSX = function () {
4325
4325
 
4326
4326
  if (utils.isNode || utils.isBrowserify || utils.isMeteorServer) {
4327
4327
  /*not-for-browser/*
4328
- XLSX = require('xlsx') || null;
4328
+ XLSX = require('../modules/xlsx/xlsx') || null;
4329
+ alasql.private.externalXlsxLib = XLSX;
4329
4330
  //*/
4330
- } else {
4331
- XLSX = utils.global.XLSX || null;
4332
4331
  }
4333
4332
 
4334
- if (null === XLSX) {
4333
+ if (!XLSX) {
4335
4334
  throw new Error('Please include the xlsx.js library');
4336
4335
  }
4337
4336