alasql 2.0.5 → 2.0.6

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
@@ -5,17 +5,17 @@
5
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)_
6
6
 
7
7
 
8
- [![CI-test](https://github.com/agershun/alasql/workflows/CI-test/badge.svg)](https://github.com/agershun/alasql/actions)
8
+ [![CI-test](https://github.com/alasql/alasql/workflows/CI-test/badge.svg)](https://github.com/alasql/alasql/actions)
9
9
  [![NPM downloads](http://img.shields.io/npm/dm/alasql.svg?style=flat&label=npm%20downloads)](https://npm-stat.com/charts.html?package=alasql)
10
10
  [![OPEN open source software](https://img.shields.io/badge/Open--OSS-%E2%9C%94-brightgreen.svg)](http://open-oss.com)
11
- [![Release](https://img.shields.io/github/release/agershun/alasql.svg?label=Last%20release&a)](https://www.npmjs.com/package/alasql)
12
- [![Stars](https://img.shields.io/github/stars/agershun/alasql.svg?label=Github%20%E2%98%85&a)](https://github.com/agershun/alasql)
13
- [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/agershun/alasql.svg)](http://isitmaintained.com/project/agershun/alasql "Average time to resolve an issue")
14
- [![Coverage]( https://img.shields.io/codecov/c/github/agershun/alasql/develop.svg)](https://rawgit.com/agershun/alasql/develop/test/coverage/lcov-report/dist/alasql.fs.js.html)
11
+ [![Release](https://img.shields.io/github/release/alasql/alasql.svg?label=Current%20release&a)](https://www.npmjs.com/package/alasql)
12
+ [![Stars](https://img.shields.io/github/stars/alasql/alasql.svg?label=Github%20%E2%98%85&a)](https://github.com/alasql/alasql)
13
+ [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/alasql/alasql.svg)](http://isitmaintained.com/project/\n/alasql "Average time to resolve an issue")
14
+ [![Coverage]( https://img.shields.io/codecov/c/github/alasql/alasql/develop.svg)](https://rawgit.com/alasql/alasql/develop/test/coverage/lcov-report/dist/alasql.fs.js.html)
15
15
  [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/328/badge)](https://bestpractices.coreinfrastructure.org/projects/328)
16
16
  [![](https://data.jsdelivr.com/v1/package/npm/alasql/badge?style=rounded)](https://www.jsdelivr.com/package/npm/alasql)
17
17
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)
18
- [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fagershun%2Falasql.svg?type=small)](https://app.fossa.io/projects/git%2Bgithub.com%2Fagershun%2Falasql?ref=badge_small)
18
+ [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Falasql%2Falasql.svg?type=small)](https://app.fossa.io/projects/git%2Bgithub.com%2Falasql%2Falasql?ref=badge_small)
19
19
 
20
20
 
21
21
 
@@ -35,9 +35,9 @@ This library is designed for:
35
35
  * Easy ETL and options for persistence by data import / manipulation / export of several formats
36
36
  * All major browsers, Node.js, and mobile applications
37
37
 
38
- We focus on [speed](https://github.com/agershun/alasql/wiki/Speed) by taking advantage of the dynamic nature of JavaScript when building up queries. Real-world solutions demand flexibility regarding where data comes from and where it is to be stored. We focus on flexibility by making sure you can [import/export](https://github.com/agershun/alasql/wiki/Import-export) and query directly on data stored in Excel (both `.xls` and `.xlsx`), CSV, JSON, TAB, IndexedDB, LocalStorage, and SQLite files.
38
+ We focus on [speed](https://github.com/alasql/alasql/wiki/Speed) by taking advantage of the dynamic nature of JavaScript when building up queries. Real-world solutions demand flexibility regarding where data comes from and where it is to be stored. We focus on flexibility by making sure you can [import/export](https://github.com/alasql/alasql/wiki/Import-export) and query directly on data stored in Excel (both `.xls` and `.xlsx`), CSV, JSON, TAB, IndexedDB, LocalStorage, and SQLite files.
39
39
 
40
- The library adds the comfort of a full database engine to your JavaScript app. No, really - it's working towards a full database engine complying with [most of the SQL-99 language](https://github.com/agershun/alasql/wiki/Supported-SQL-statements), spiced up with additional syntax for NoSQL (schema-less) data and graph networks.
40
+ The library adds the comfort of a full database engine to your JavaScript app. No, really - it's working towards a full database engine complying with [most of the SQL-99 language](https://github.com/alasql/alasql/wiki/Supported-SQL-statements), spiced up with additional syntax for NoSQL (schema-less) data and graph networks.
41
41
 
42
42
 
43
43
  #### Traditional SQL Table
@@ -126,17 +126,17 @@ For the browser: include [alasql.min.js](https://cdn.jsdelivr.net/npm/alasql)
126
126
 
127
127
  ## Getting started
128
128
 
129
- See the ["Getting started" section of the wiki](https://github.com/agershun/alasql/wiki/Getting%20started)
129
+ See the ["Getting started" section of the wiki](https://github.com/alasql/alasql/wiki/Getting%20started)
130
130
 
131
- More advanced topics are covered in other wiki sections like ["Data manipulation"](https://github.com/agershun/alasql/wiki/Data-manipulation) and in questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/alasql)
131
+ More advanced topics are covered in other wiki sections like ["Data manipulation"](https://github.com/alasql/alasql/wiki/Data-manipulation) and in questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/alasql)
132
132
 
133
133
  Other links:
134
134
 
135
- * Documentation: [Github wiki](https://github.com/agershun/alasql/wiki)
135
+ * Documentation: [Github wiki](https://github.com/alasql/alasql/wiki)
136
136
 
137
137
  * Library CDN: [jsDelivr.com](http://www.jsdelivr.com/#!alasql)
138
138
 
139
- * Feedback: [Open an issue](https://github.com/agershun/alasql/issues/new)
139
+ * Feedback: [Open an issue](https://github.com/alasql/alasql/issues/new)
140
140
 
141
141
  * Try online: <a href="http://alasql.org/console?CREATE TABLE cities (city string, population number);INSERT INTO cities VALUES ('Rome',2863223), ('Paris',2249975),('Berlin',3517424), ('Madrid',3041579);SELECT * FROM cities WHERE population < 3500000 ORDER BY population DESC">Playground</a>
142
142
 
@@ -146,11 +146,11 @@ Other links:
146
146
  ## Please note
147
147
 
148
148
  **All contributions are extremely welcome and greatly appreciated(!)** -
149
- The project has never received any funding and is based on unpaid voluntary work: [We really (really) love pull requests](https://github.com/agershun/alasql/blob/develop/CONTRIBUTING.md)
149
+ The project has never received any funding and is based on unpaid voluntary work: [We really (really) love pull requests](https://github.com/alasql/alasql/blob/develop/CONTRIBUTING.md)
150
150
 
151
- The AlaSQL project depends on your contribution of code and <s>may</s> have [bugs](https://github.com/agershun/alasql/labels/%21%20Bug). So please, submit any bugs and suggestions [as an issue](https://github.com/agershun/alasql/issues/new).
151
+ The AlaSQL project depends on your contribution of code and <s>may</s> have [bugs](https://github.com/alasql/alasql/labels/%21%20Bug). So please, submit any bugs and suggestions [as an issue](https://github.com/alasql/alasql/issues/new).
152
152
 
153
- Please check out the [limitations of the library](https://github.com/agershun/alasql#limitations).
153
+ Please check out the [limitations of the library](https://github.com/alasql/alasql#limitations).
154
154
 
155
155
  ## Performance
156
156
 
@@ -160,14 +160,14 @@ AlaSQL is designed for speed and includes some of the classic SQL engine optimiz
160
160
  * Joined tables are pre-indexed
161
161
  * `WHERE` expressions are pre-filtered for joins
162
162
 
163
- See more [performance-related info on the wiki](https://github.com/agershun/alasql/wiki/Speed)
163
+ See more [performance-related info on the wiki](https://github.com/alasql/alasql/wiki/Speed)
164
164
 
165
165
  ## Features you might like
166
166
 
167
167
 
168
168
  ### Traditional SQL
169
169
 
170
- Use "good old" SQL on your data with multiple levels of: `JOIN`, `VIEW`, `GROUP BY`, `UNION`, `PRIMARY KEY`, `ANY`, `ALL`, `IN`, `ROLLUP()`, `CUBE()`, `GROUPING SETS()`, `CROSS APPLY`, `OUTER APPLY`, `WITH SELECT`, and subqueries. [The wiki lists supported SQL statements and keywords](https://github.com/agershun/alasql/wiki/SQL%20keywords).
170
+ Use "good old" SQL on your data with multiple levels of: `JOIN`, `VIEW`, `GROUP BY`, `UNION`, `PRIMARY KEY`, `ANY`, `ALL`, `IN`, `ROLLUP()`, `CUBE()`, `GROUPING SETS()`, `CROSS APPLY`, `OUTER APPLY`, `WITH SELECT`, and subqueries. [The wiki lists supported SQL statements and keywords](https://github.com/alasql/alasql/wiki/SQL%20keywords).
171
171
 
172
172
 
173
173
 
@@ -183,7 +183,7 @@ alasql.fn.myfn = function(a,b) {
183
183
  var res = alasql('SELECT myfn(a,b) FROM one');
184
184
  ```
185
185
 
186
- You can also define your own aggregator functions (like your own `SUM(...)`). See more [in the wiki](https://github.com/agershun/alasql/wiki/User-Defined-Functions)
186
+ You can also define your own aggregator functions (like your own `SUM(...)`). See more [in the wiki](https://github.com/alasql/alasql/wiki/User-Defined-Functions)
187
187
 
188
188
 
189
189
  ### Compiled statements and functions
@@ -194,7 +194,7 @@ ins(1,10);
194
194
  ins(2,20);
195
195
  ```
196
196
 
197
- See more [in the wiki](https://github.com/agershun/alasql/wiki/Compile)
197
+ See more [in the wiki](https://github.com/alasql/alasql/wiki/Compile)
198
198
 
199
199
 
200
200
  ### SELECT against your JavaScript data
@@ -206,7 +206,7 @@ var data = [{a:1,b:1,c:1},{a:1,b:2,c:1},{a:1,b:3,c:1}, {a:2,b:1,c:1}];
206
206
  var res = alasql('SELECT a, COUNT(*) AS b FROM ? GROUP BY a', [data] );
207
207
  ```
208
208
 
209
- See more ideas for creative data manipulation [in the wiki](https://github.com/agershun/alasql/wiki/Getting-started)
209
+ See more ideas for creative data manipulation [in the wiki](https://github.com/alasql/alasql/wiki/Getting-started)
210
210
 
211
211
 
212
212
 
@@ -278,46 +278,46 @@ $ alasql "VALUE OF SELECT COUNT(*) AS abc FROM TXT('README.md') WHERE LENGTH([0]
278
278
  // Number of lines with more than 140 characters in README.md
279
279
  ```
280
280
 
281
- [More examples are included in the wiki](https://github.com/agershun/alasql/wiki/AlaSQL-CLI)
281
+ [More examples are included in the wiki](https://github.com/alasql/alasql/wiki/AlaSQL-CLI)
282
282
 
283
283
 
284
284
  ## Features you might love
285
285
 
286
286
  ### AlaSQL ♥ D3.js
287
287
 
288
- AlaSQL plays nice with d3.js and gives you a convenient way to integrate a specific subset of your data with the visual powers of D3. See more about [D3.js and AlaSQL in the wiki](https://github.com/agershun/alasql/wiki/d3.js)
288
+ AlaSQL plays nice with d3.js and gives you a convenient way to integrate a specific subset of your data with the visual powers of D3. See more about [D3.js and AlaSQL in the wiki](https://github.com/alasql/alasql/wiki/d3.js)
289
289
 
290
290
  ### AlaSQL ♥ Excel
291
291
 
292
- AlaSQL can export data to both [Excel 2003 (.xls)](https://github.com/agershun/alasql/wiki/XLS) and [Excel 2007 (.xlsx)](https://github.com/agershun/alasql/wiki/XLSX) formats with coloring of cells and other Excel formatting functions.
292
+ AlaSQL can export data to both [Excel 2003 (.xls)](https://github.com/alasql/alasql/wiki/XLS) and [Excel 2007 (.xlsx)](https://github.com/alasql/alasql/wiki/XLSX) formats with coloring of cells and other Excel formatting functions.
293
293
 
294
294
  ### AlaSQL ♥ Meteor
295
295
 
296
- Meteor is amazing. You can query directly on your Meteor collections with SQL - simple and easy. See more about [Meteor and AlaSQL in the wiki](https://github.com/agershun/alasql/wiki/Meteor)
296
+ Meteor is amazing. You can query directly on your Meteor collections with SQL - simple and easy. See more about [Meteor and AlaSQL in the wiki](https://github.com/alasql/alasql/wiki/Meteor)
297
297
 
298
298
  ### AlaSQL ♥ Angular.js
299
299
 
300
- Angular is great. In addition to normal data manipulation, AlaSQL works like a charm for exporting your present scope to Excel. See more about [Angular and AlaSQL in the wiki](https://github.com/agershun/alasql/wiki/Angular.js)
300
+ Angular is great. In addition to normal data manipulation, AlaSQL works like a charm for exporting your present scope to Excel. See more about [Angular and AlaSQL in the wiki](https://github.com/alasql/alasql/wiki/Angular.js)
301
301
 
302
302
  ### AlaSQL ♥ Google Maps
303
303
 
304
- Pinpointing data on a map should be easy. AlaSQL is great to prepare source data for Google Maps from, for example, Excel or CSV, making it one unit of work for fetching and identifying what's relevant. See more about [Google Maps and AlaSQL in the wiki](https://github.com/agershun/alasql/wiki/Google-maps)
304
+ Pinpointing data on a map should be easy. AlaSQL is great to prepare source data for Google Maps from, for example, Excel or CSV, making it one unit of work for fetching and identifying what's relevant. See more about [Google Maps and AlaSQL in the wiki](https://github.com/alasql/alasql/wiki/Google-maps)
305
305
 
306
306
  ### AlaSQL ♥ Google Spreadsheets
307
307
 
308
- AlaSQL can query data directly from a Google spreadsheet. A good "partnership" for easy editing and powerful data manipulation. See more about [Google Spreadsheets and AlaSQL in the wiki](https://github.com/agershun/alasql/wiki/Google-Spreadsheets)
308
+ AlaSQL can query data directly from a Google spreadsheet. A good "partnership" for easy editing and powerful data manipulation. See more about [Google Spreadsheets and AlaSQL in the wiki](https://github.com/alasql/alasql/wiki/Google-Spreadsheets)
309
309
 
310
310
  ### Miss a feature?
311
- Take charge and [add your idea](http://feathub.com/agershun/alasql/features/new) or [vote for your favorite feature](http://feathub.com/agershun/alasql) to be implemented:
311
+ Take charge and [add your idea](http://feathub.com/alasql/alasql/features/new) or [vote for your favorite feature](http://feathub.com/alasql/alasql) to be implemented:
312
312
 
313
- [![Feature Requests](http://feathub.com/agershun/alasql?format=svg)](http://feathub.com/agershun/alasql)
313
+ [![Feature Requests](http://feathub.com/alasql/alasql?format=svg)](http://feathub.com/alasql/alasql)
314
314
 
315
315
 
316
316
  ## Limitations
317
317
 
318
- Please be aware that AlaSQL has [bugs](https://github.com/agershun/alasql/labels/Bug). Beside having some bugs, there are a number of limitations:
318
+ Please be aware that AlaSQL has [bugs](https://github.com/alasql/alasql/labels/Bug). Beside having some bugs, there are a number of limitations:
319
319
 
320
- 0. AlaSQL has a (long) list of keywords that must be escaped if used for column names. When selecting a field named `key` please write ``` SELECT `key` FROM ... ``` instead. This is also the case for words like ``` `value` ```, ``` `read` ```, ``` `count` ```, ``` `by` ```, ``` `top` ```, ``` `path` ```, ``` `deleted` ```, ``` `work` ``` and ``` `offset` ```. Please consult the [full list of keywords](https://github.com/agershun/alasql/wiki/AlaSQL-Keywords).
320
+ 0. AlaSQL has a (long) list of keywords that must be escaped if used for column names. When selecting a field named `key` please write ``` SELECT `key` FROM ... ``` instead. This is also the case for words like ``` `value` ```, ``` `read` ```, ``` `count` ```, ``` `by` ```, ``` `top` ```, ``` `path` ```, ``` `deleted` ```, ``` `work` ``` and ``` `offset` ```. Please consult the [full list of keywords](https://github.com/alasql/alasql/wiki/AlaSQL-Keywords).
321
321
 
322
322
  0. It is OK to `SELECT` 1000000 records or to `JOIN` two tables with 10000 records in each (You can use streaming functions to work with longer datasources - see [test/test143.js](test/test143.js)) but be aware that the workload is multiplied so `SELECT`ing from more than 8 tables with just 100 rows in each will show bad performance. This is one of our top priorities to make better.
323
323
 
@@ -329,11 +329,11 @@ Please be aware that AlaSQL has [bugs](https://github.com/agershun/alasql/labels
329
329
 
330
330
  0. At the moment AlaSQL does not work with JSZip 3.0.0 - please use version 2.x.
331
331
 
332
- 0. `JOIN`ing a sub-`SELECT` does not work. Please use a `with` structure ([Example here](https://github.com/agershun/alasql/issues/832#issuecomment-377574550)) or fetch the sub-`SELECT` to a variable and pass it as an argument ([Example here](https://github.com/agershun/alasql/issues/832#issuecomment-377559478)).
332
+ 0. `JOIN`ing a sub-`SELECT` does not work. Please use a `with` structure ([Example here](https://github.com/alasql/alasql/issues/832#issuecomment-377574550)) or fetch the sub-`SELECT` to a variable and pass it as an argument ([Example here](https://github.com/alasql/alasql/issues/832#issuecomment-377559478)).
333
333
 
334
334
  0. AlaSQL uses the [FileSaver.js](https://github.com/eligrey/FileSaver.js/) library for saving files locally from the browser. Please be aware that it does not save files in Safari 8.0.
335
335
 
336
- There are probably many others. Please help us fix them by [submitting an issue](https://github.com/agershun/alasql/issues). Thank you!
336
+ There are probably many others. Please help us fix them by [submitting an issue](https://github.com/alasql/alasql/issues). Thank you!
337
337
 
338
338
 
339
339
  ## How To
@@ -526,7 +526,7 @@ var res = alasql('SEARCH / ANY(>> >> #Alice) name');
526
526
  console.log(res) // ['Olga','Helen']
527
527
  ```
528
528
 
529
- See more [in the wiki](https://github.com/agershun/alasql/wiki/GRAPH)
529
+ See more [in the wiki](https://github.com/alasql/alasql/wiki/GRAPH)
530
530
 
531
531
  ### localStorage and DOM-storage
532
532
 
@@ -553,7 +553,7 @@ to use `COMMIT` statement to save all data from in-memory mirror to localStorage
553
553
 
554
554
  ### Plugins
555
555
 
556
- AlaSQL supports plugins. To install a plugin you need to use the `REQUIRE` statement. See more [in the wiki](https://github.com/agershun/alasql/wiki/Plugins)
556
+ AlaSQL supports plugins. To install a plugin you need to use the `REQUIRE` statement. See more [in the wiki](https://github.com/alasql/alasql/wiki/Plugins)
557
557
 
558
558
  ### Alaserver - simple database server
559
559
 
@@ -574,7 +574,7 @@ Warning: Alaserver is not multi-threaded, not concurrent, and not secured.
574
574
 
575
575
  ### Regression tests
576
576
 
577
- AlaSQL currently has over 1200 regression tests, but they only cover [![Coverage]( https://img.shields.io/codecov/c/github/agershun/alasql/develop.svg)](https://rawgit.com/agershun/alasql/develop/test/coverage/lcov-report/dist/alasql.fs.js.html)
577
+ AlaSQL currently has over 1200 regression tests, but they only cover [![Coverage]( https://img.shields.io/codecov/c/github/alasql/alasql/develop.svg)](https://rawgit.com/alasql/alasql/develop/test/coverage/lcov-report/dist/alasql.fs.js.html)
578
578
  of the codebase.
579
579
 
580
580
  AlaSQL uses `mocha` for regression tests. Install `mocha` and run
@@ -609,8 +609,8 @@ See [Contributing](CONTRIBUTING.md) for details.
609
609
 
610
610
  Thanks to all the people who already contributed!
611
611
 
612
- <a href="https://github.com/agershun/alasql/graphs/contributors">
613
- <img src="https://contributors-img.web.app/image?repo=agershun/alasql" />
612
+ <a href="https://github.com/alasql/alasql/graphs/contributors">
613
+ <img src="https://contributors-img.web.app/image?repo=alasql/alasql" />
614
614
  </a>
615
615
 
616
616
 
@@ -621,14 +621,14 @@ MIT - see [MIT licence information](LICENSE)
621
621
 
622
622
  ## Main contributors
623
623
 
624
- * [Andrey Gershun](https://github.com/agershun)
624
+ * [Andrey Gershun](https://github.com/alasql)
625
625
  * [Mathias Rangel Wulff](https://twitter.com/rangelwulff)
626
626
 
627
627
  AlaSQL is an [OPEN Open Source Project](http://openopensource.org/). This means that:
628
628
 
629
629
  > Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
630
630
 
631
- We appreciate any and all contributions we can get. If you feel like contributing, have a look at [CONTRIBUTING.md](https://github.com/agershun/alasql/blob/develop/CONTRIBUTING.md)
631
+ We appreciate any and all contributions we can get. If you feel like contributing, have a look at [CONTRIBUTING.md](https://github.com/alasql/alasql/blob/develop/CONTRIBUTING.md)
632
632
 
633
633
 
634
634
  ## Credits
@@ -644,10 +644,10 @@ and other people for useful tools, which make our work much easier.
644
644
 
645
645
  ### Related projects that have inspired us
646
646
 
647
- * [AlaX](http://github.com/agershun/alax) - Export to Excel with colors and formats
648
- * [WebSQLShim](http://github.com/agershun/WebSQLShim) - WebSQL shim over IndexedDB (work in progress)
649
- * [AlaMDX](http://github.com/agershun/alamdx) - JavaScript MDX OLAP library (work in progress)
650
- * [Other similar projects](http://github.com/agershun/alasql/wiki/Similar-Projects.md) - list of databases on JavaScript
647
+ * [AlaX](http://github.com/alasql/alax) - Export to Excel with colors and formats
648
+ * [WebSQLShim](http://github.com/alasql/WebSQLShim) - WebSQL shim over IndexedDB (work in progress)
649
+ * [AlaMDX](http://github.com/alasql/alamdx) - JavaScript MDX OLAP library (work in progress)
650
+ * [Other similar projects](http://github.com/alasql/alasql/wiki/Similar-Projects.md) - list of databases on JavaScript
651
651
 
652
652
 
653
653
 
@@ -1,7 +1,7 @@
1
- //! AlaSQL v2.0.5-develop-19f773a3undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.6-develop-b16970f3undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 2.0.5-develop-19f773a3undefined
4
+ @version 2.0.6-develop-b16970f3undefined
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.5-develop-19f773a3undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.6-develop-b16970f3undefined | © 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.fs.js CHANGED
@@ -1,7 +1,7 @@
1
- //! AlaSQL v2.0.5-develop-19f773a3undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.6-develop-b16970f3undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 2.0.5-develop-19f773a3undefined
4
+ @version 2.0.6-develop-b16970f3undefined
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.5-develop-19f773a3undefined';
145
+ alasql.version = '2.0.6-develop-b16970f3undefined';
146
146
 
147
147
  /**
148
148
  Debug flag
@@ -13292,6 +13292,7 @@ stdfn.ASCII = function (a) {
13292
13292
  */
13293
13293
  stdfn.COALESCE = function () {
13294
13294
  for (var i = 0; i < arguments.length; i++) {
13295
+ if (arguments[i] === null) continue;
13295
13296
  if (typeof arguments[i] == 'undefined') continue;
13296
13297
  if (typeof arguments[i] == 'number' && isNaN(arguments[i])) continue;
13297
13298
  return arguments[i];
package/dist/alasql.js CHANGED
@@ -1,7 +1,7 @@
1
- //! AlaSQL v2.0.5-develop-19f773a3undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v2.0.6-develop-b16970f3undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 2.0.5-develop-19f773a3undefined
4
+ @version 2.0.6-develop-b16970f3undefined
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.5-develop-19f773a3undefined';
145
+ alasql.version = '2.0.6-develop-b16970f3undefined';
146
146
 
147
147
  /**
148
148
  Debug flag
@@ -13287,6 +13287,7 @@ stdfn.ASCII = function (a) {
13287
13287
  */
13288
13288
  stdfn.COALESCE = function () {
13289
13289
  for (var i = 0; i < arguments.length; i++) {
13290
+ if (arguments[i] === null) continue;
13290
13291
  if (typeof arguments[i] == 'undefined') continue;
13291
13292
  if (typeof arguments[i] == 'number' && isNaN(arguments[i])) continue;
13292
13293
  return arguments[i];