alasql 2.0.1 → 2.0.3

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
@@ -1,6 +1,8 @@
1
- _AlaSQL is an open source project used on more than two million page views per month - and we appreciate any and all contributions we can get. [Please help out](https://github.com/agershun/alasql/labels/Please%20help%20out%21)._
1
+ - _AlaSQL is an unfunded open source project installed 95k time each month. [Please donate your time](https://github.com/AlaSQL/alasql/issues?q=is%3Aopen+label%3A%22Help+wanted%22+label%3A%22Good+first+issue%22+sort%3Acreated-desc+). We appreciate any and all contributions we can get._
2
2
 
3
- _Have a question? Ask on [Stack Overflow](http://stackoverflow.com/questions/ask?tags=AlaSQL) using the "alasql" tag._
3
+ - _Have a question? Ask on [Stack Overflow](http://stackoverflow.com/questions/ask?tags=AlaSQL) using the "alasql" tag._
4
+
5
+ - _Wondering if you should upgrade to v2? You probably should, but check the two breaking changes [here](https://github.com/AlaSQL/alasql/releases/tag/v2.0.1)_
4
6
 
5
7
 
6
8
  [![CI-test](https://github.com/agershun/alasql/workflows/CI-test/badge.svg)](https://github.com/agershun/alasql/actions)
@@ -118,7 +120,7 @@ For the browser: include [alasql.min.js](https://cdn.jsdelivr.net/npm/alasql)
118
120
 
119
121
 
120
122
  ```html
121
- <script src="https://cdn.jsdelivr.net/npm/alasql@1.7"></script>
123
+ <script src="https://cdn.jsdelivr.net/npm/alasql@2"></script>
122
124
  ```
123
125
 
124
126
 
package/bin/alasql-cli.js CHANGED
@@ -96,6 +96,8 @@ stdin.on('end', function () {
96
96
  * @returns {null} Result will be printet to console.log
97
97
  */
98
98
  function execute(sql, params) {
99
+ if ('' === sql) sql = params.shift() || '';
100
+
99
101
  if (0 === sql.trim().length) {
100
102
  console.error('\nNo SQL to process\n');
101
103
  yargs.showHelp();
@@ -1,7 +1,7 @@
1
- //! AlaSQL v2.0.1-develop-04b99c42undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.3-develop-4b3ed7a7undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 2.0.1-develop-04b99c42undefined
4
+ @version 2.0.3-develop-4b3ed7a7undefined
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2016 Andrey Gershun & Mathias Rangel Wulff
@@ -1,2 +1,2 @@
1
- //! AlaSQL v2.0.1-develop-04b99c42undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.3-develop-4b3ed7a7undefined | © 2014-2018 Andrey Gershun & Mathias Rangel 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.d.ts CHANGED
@@ -30,6 +30,7 @@ declare namespace alaSQLSpace {
30
30
  oracle: boolean;
31
31
  sqlite: boolean;
32
32
  orientdb: boolean;
33
+ excel: any;
33
34
  }
34
35
 
35
36
  // compiled Statement
@@ -57,7 +58,7 @@ declare namespace alaSQLSpace {
57
58
 
58
59
  // see https://github.com/agershun/alasql/wiki/User%20Defined%20Functions
59
60
  interface userDefinedFunction {
60
- (x: any): any;
61
+ (...x: any[]): any;
61
62
  }
62
63
  interface userDefinedFunctionLookUp {
63
64
  [x: string]: userDefinedFunction;
package/dist/alasql.fs.js CHANGED
@@ -1,7 +1,7 @@
1
- //! AlaSQL v2.0.1-develop-04b99c42undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.3-develop-4b3ed7a7undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 2.0.1-develop-04b99c42undefined
4
+ @version 2.0.3-develop-4b3ed7a7undefined
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2016 Andrey Gershun & Mathias Rangel Wulff
@@ -142,7 +142,7 @@ var alasql = function(sql, params, cb, scope) {
142
142
  Current version of alasql
143
143
  @constant {string}
144
144
  */
145
- alasql.version = '2.0.1-develop-04b99c42undefined';
145
+ alasql.version = '2.0.3-develop-4b3ed7a7undefined';
146
146
 
147
147
  /**
148
148
  Debug flag
package/dist/alasql.js CHANGED
@@ -1,7 +1,7 @@
1
- //! AlaSQL v2.0.1-develop-04b99c42undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.3-develop-4b3ed7a7undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 2.0.1-develop-04b99c42undefined
4
+ @version 2.0.3-develop-4b3ed7a7undefined
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2016 Andrey Gershun & Mathias Rangel Wulff
@@ -142,7 +142,7 @@ var alasql = function(sql, params, cb, scope) {
142
142
  Current version of alasql
143
143
  @constant {string}
144
144
  */
145
- alasql.version = '2.0.1-develop-04b99c42undefined';
145
+ alasql.version = '2.0.3-develop-4b3ed7a7undefined';
146
146
 
147
147
  /**
148
148
  Debug flag