alasql 4.23.1 → 4.23.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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2014 - present Andrey Gershun
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2014 - present Andrey Gershun & Mathias Wulff
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- - _AlaSQL is an unfunded open source project installed 650k+ times each month. [Please donate your time](https://github.com/AlaSQL/alasql/issues?q=is%3Aopen+label%3A%22Help+wanted%22+sort%3Aupdated-desc). We appreciate any and all contributions we can get._
1
+ - _AlaSQL is an unfunded open source project installed 1M+ times each month. [Please donate your time](https://github.com/AlaSQL/alasql/issues?q=is%3Aopen+label%3A%22Help+wanted%22+sort%3Aupdated-desc). We appreciate any and all contributions we can get._
2
2
 
3
- - _Have a question? [Ask The AlaSQL Bot](https://chatgpt.com/g/g-XcBL24WTe-alasql-bot) or post on [Stack Overflow](http://stackoverflow.com/questions/ask?tags=AlaSQL)._
3
+ - _Have a question? [Ask The AlaSQL Bot](https://chatgpt.com/g/g-XcBL24WTe-alasql-bot) or post on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=AlaSQL)._
4
4
 
5
- [![CI-test](https://github.com/alasql/alasql/workflows/CI%20build%20&%20test/badge.svg)](https://github.com/alasql/alasql/actions)
6
- [![NPM downloads](http://img.shields.io/npm/dm/alasql.svg?style=flat&label=npm%20downloads)](https://npm-stat.com/charts.html?package=alasql)
5
+ [![CI-test](https://github.com/AlaSQL/alasql/actions/workflows/Build%20and%20test.yml/badge.svg)](https://github.com/AlaSQL/alasql/actions)
6
+ [![NPM downloads](https://img.shields.io/npm/dm/alasql.svg?style=flat&label=npm%20downloads)](https://npm-stat.com/charts.html?package=alasql)
7
7
  [![OPEN open source software](https://img.shields.io/badge/Open--OSS-%E2%9C%94-brightgreen.svg)](http://open-oss.com)
8
8
  [![Release](https://img.shields.io/github/release/alasql/alasql.svg?label=npm&a)](https://www.npmjs.com/package/alasql)
9
9
  [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/AlaSQL/alasql.svg)](http://isitmaintained.com/project/AlaSQL/alasql 'Average time to resolve an issue')
10
- [![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)
10
+ [![Coverage](https://img.shields.io/codecov/c/github/alasql/alasql/main.svg)](https://rawgit.com/alasql/alasql/main/test/coverage/lcov-report/dist/alasql.fs.js.html)
11
11
  [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/AlaSQL/alasql/badge)](https://securityscorecards.dev/viewer/?uri=github.com/AlaSQL/alasql)
12
12
  [![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/328/badge)](https://bestpractices.coreinfrastructure.org/projects/328)
13
13
  [![](https://data.jsdelivr.com/v1/package/npm/alasql/badge?style=rounded)](https://www.jsdelivr.com/package/npm/alasql)
@@ -15,10 +15,10 @@
15
15
 
16
16
  # AlaSQL
17
17
 
18
- <h2 align="center"><a href="http://alasql.org"><img src="https://cloud.githubusercontent.com/assets/1063454/19309516/94f8007e-9085-11e6-810f-62fd60b42185.png" alt="AlaSQL logo" style="max-width:80%"/></a>
18
+ <h2 align="center"><a href="https://alasql.org"><img src="https://cloud.githubusercontent.com/assets/1063454/19309516/94f8007e-9085-11e6-810f-62fd60b42185.png" alt="AlaSQL logo" style="max-width:80%"/></a>
19
19
  </h2>
20
20
 
21
- 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.
21
+ AlaSQL - _( [à la](https://en.wiktionary.org/wiki/%C3%A0_la) [SQL](https://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.
22
22
 
23
23
  This library is perfect for:
24
24
 
@@ -102,46 +102,52 @@ console.log(res); // [{a:2,b:6},{a:1,b:5},{a:3,b:4}]
102
102
 
103
103
  AlaSQL has several [configuration options](https://github.com/AlaSQL/alasql/wiki/AlaSQL-Options) which change the behavior. It can be set via SQL statements or via the options object before using `alasql`.
104
104
 
105
- If you're using `NOW()` in queries often, setting `alasql.options.dateAsString` to `false` speed things up. It will just return a JS Date object instead of a string representation of a date.
105
+ If you're using `NOW()` in queries often, setting `alasql.options.dateAsString` to `false` speeds things up. It will just return a JS Date object instead of a string representation of a date.
106
106
 
107
107
  ## Installation
108
108
 
109
109
  ```bash
110
+ bun add alasql # bun
110
111
  yarn add alasql # yarn
111
-
112
112
  npm install alasql # npm
113
113
 
114
- npm install -g alasql # global install of command line tool
114
+ bun install -g alasql # command line tool
115
+ npm install -g alasql # command line tool
115
116
  ```
116
117
 
117
- For the browsers: include [alasql.min.js](https://cdn.jsdelivr.net/npm/alasql)
118
+ ```js
119
+ import alasql from 'alasql';
120
+ // or: const alasql = require('alasql');
121
+ ```
122
+
123
+ In the browser, include [alasql.min.js](https://cdn.jsdelivr.net/npm/alasql@4.23.3/dist/alasql.min.js):
118
124
 
119
125
  ```html
120
- <script src="https://cdn.jsdelivr.net/npm/alasql@4"></script>
126
+ <script src="https://cdn.jsdelivr.net/npm/alasql@4.23.3/dist/alasql.min.js"></script>
121
127
  ```
122
128
 
123
129
  ## Getting started
124
130
 
125
131
  See the ["Getting started" section of the wiki](https://github.com/alasql/alasql/wiki/Getting%20started)
126
132
 
127
- 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)
133
+ 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](https://stackoverflow.com/questions/tagged/alasql)
128
134
 
129
135
  Other links:
130
136
 
131
- - Documentation: [Github wiki](https://github.com/alasql/alasql/wiki)
137
+ - Documentation: [GitHub wiki](https://github.com/alasql/alasql/wiki)
132
138
 
133
- - Library CDN: [jsDelivr.com](http://www.jsdelivr.com/#!alasql)
139
+ - Library CDN: [jsDelivr.com](https://www.jsdelivr.com/package/npm/alasql)
134
140
 
135
141
  - Feedback: [Open an issue](https://github.com/alasql/alasql/issues/new)
136
142
 
137
- - 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>
143
+ - Try online: <a href="https://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>
138
144
 
139
- - Website: [alasql.org](http://AlaSQL.org)
145
+ - Website: [AlaSQL.org](https://alasql.org)
140
146
 
141
147
  ## Please note
142
148
 
143
149
  **All contributions are extremely welcome and greatly appreciated(!)** -
144
- 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
+ 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/main/CONTRIBUTING.md)
145
151
 
146
152
  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).
147
153
 
@@ -335,11 +341,7 @@ Please be aware that AlaSQL has [bugs](https://github.com/alasql/alasql/labels/B
335
341
 
336
342
  4. Please use aliases when you want fields with the same name from different tables (`SELECT a.id AS a_id, b.id AS b_id FROM ?`).
337
343
 
338
- 5. At the moment AlaSQL does not work with JSZip 3.0.0 - please use version 2.x.
339
-
340
- 6. `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)).
341
-
342
- 7. 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.
344
+ 5. 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.
343
345
 
344
346
  There are probably many others. Please help us fix them by [submitting an issue](https://github.com/alasql/alasql/issues). Thank you!
345
347
 
@@ -363,10 +365,10 @@ alasql([
363
365
 
364
366
  AlaSQL can run in a Web Worker. Please be aware that all interaction with AlaSQL when running must be async.
365
367
 
366
- From the browser thread, the browser build `alasql-worker.min.js` automagically uses Web Workers:
368
+ From the browser thread, the browser build `alasql-worker.js` automagically uses Web Workers:
367
369
 
368
370
  ```html
369
- <script src="alasql-worker.min.js"></script>
371
+ <script src="alasql-worker.js"></script>
370
372
  <script>
371
373
  var arr = [{a: 1}, {a: 2}, {a: 1}];
372
374
 
@@ -392,7 +394,7 @@ The standard build `alasql.min.js` will use Web Workers if `alasql.worker()` is
392
394
  </script>
393
395
  ```
394
396
 
395
- [Live Demo](http://jsfiddle.net/osxvdp5k/).
397
+ [Live Demo](https://jsfiddle.net/osxvdp5k/).
396
398
 
397
399
  From a Web Worker, you can import `alasql.min.js` with `importScripts`:
398
400
 
@@ -400,94 +402,20 @@ From a Web Worker, you can import `alasql.min.js` with `importScripts`:
400
402
  importScripts('alasql.min.js');
401
403
  ```
402
404
 
403
- ### Webpack, Browserify, Vue and React (Native)
404
-
405
- When targeting the browser, several code bundlers like Webpack and Browserify will pick up modules you might not want.
406
-
407
- Here's a list of modules that AlaSQL may require in certain environments or for certain features:
408
-
409
- - Node.js
410
- - fs
411
- - net
412
- - tls
413
- - request
414
- - path
415
- - React Native
416
- - react-native
417
- - react-native-fs
418
- - react-native-fetch-blob
419
- - Vertx
420
- - vertx
421
- - Agonostic
422
- - XLSX/XLS support
423
- - cptable
424
- - jszip
425
- - xlsx
426
- - cpexcel
427
- - es6-promise
405
+ ### Bundlers: Webpack, Vite, Rollup, esbuild and others
428
406
 
429
- #### Webpack
407
+ `import alasql from 'alasql'` works without extra configuration. The package tells bundlers which file to use, and a build for the browser gets `alasql.min.js`, which has no Node imports.
430
408
 
431
- There are several ways to handle AlaSQL with Webpack:
432
-
433
- ##### IgnorePlugin
434
-
435
- Ideal when you want to control which modules you want to import.
409
+ To read and write Excel files in the browser, install [SheetJS](https://sheetjs.com) and hand it to AlaSQL:
436
410
 
437
411
  ```js
438
- var IgnorePlugin = require("webpack").IgnorePlugin;
412
+ import alasql from 'alasql';
413
+ import * as XLSX from 'xlsx';
439
414
 
440
- module.exports = {
441
- ...
442
- // Will ignore the modules fs, path, xlsx, request, vertx, and react-native modules
443
- plugins:[new IgnorePlugin(/(^fs$|cptable|jszip|xlsx|^es6-promise$|^net$|^tls$|^forever-agent$|^tough-cookie$|cpexcel|^path$|^request$|react-native|^vertx$)/)]
444
- };
415
+ alasql.setXLSX(XLSX);
445
416
  ```
446
417
 
447
- ##### module.noParse
448
-
449
- As of AlaSQL 0.3.5, you can simply tell Webpack not to parse AlaSQL, which avoids all the dynamic `require` warnings and avoids using `eval`/clashing with CSP with script-loader.
450
- [Read the Webpack docs about noParse](https://webpack.js.org/configuration/module/#modulenoparse)
451
-
452
- ```js
453
- ...
454
- //Don't parse alasql
455
- {module:noParse:[/alasql/]}
456
- ```
457
-
458
- ##### script-loader
459
-
460
- If both of the solutions above fail to meet your requirements, you can load AlaSQL with [script-loader](https://github.com/webpack/script-loader).
461
-
462
- ```js
463
- //Load alasql in the global scope with script-loader
464
- import 'script!alasql';
465
- ```
466
-
467
- This can cause issues if you have a CSP that doesn't allow `eval`.
468
-
469
- #### Browserify
470
-
471
- Read up on [excluding](https://github.com/substack/browserify-handbook#excluding), [ignoring](https://github.com/substack/browserify-handbook#ignoring), and [shimming](https://github.com/substack/browserify-handbook#shimming)
472
-
473
- Example (using excluding)
474
-
475
- ```js
476
- var browserify = require("browserify");
477
- var b = browserify("./main.js").bundle();
478
- //Will ignore the modules fs, path, xlsx
479
- ["fs","path","xlsx", ... ].forEach(ignore => { b.ignore(ignore) });
480
- ```
481
-
482
- #### Vue
483
-
484
- For some frameworks (like Vue) alasql can't access XLSX by it self. We recommend handling it by including AlaSQL the following way:
485
-
486
- ```import alasql from 'alasql';
487
- import XLSX from 'xlsx';
488
- alasql.utils.isBrowserify = false;
489
- alasql.utils.global.XLSX = XLSX;
490
- ```
418
+ In React Native, install `react-native-fs` to read and write files.
491
419
 
492
420
  #### jQuery
493
421
 
@@ -517,7 +445,7 @@ alasql> SELECT VALUE {a:'1',b:(2*2)}->b
517
445
 
518
446
  ```
519
447
 
520
- Try AlaSQL JSON objects in Console [sample](http://alasql.org/console?drop table if exists one;create table one;insert into one values {a:@[1,2,3],c:{e:23}}, {a:@[{b:@[1,2,3]}]};select \* from one)
448
+ Try AlaSQL JSON objects in Console [sample](https://alasql.org/console?drop table if exists one;create table one;insert into one values {a:@[1,2,3],c:{e:23}}, {a:@[{b:@[1,2,3]}]};select \* from one)
521
449
 
522
450
  ## Experimental
523
451
 
@@ -552,7 +480,7 @@ alasql('SELECT * INTO MyAtlas.City FROM ?', [
552
480
  var res = alasql('SELECT * FROM MyAtlas.City');
553
481
  ```
554
482
 
555
- Try this sample in [jsFiddle](http://jsfiddle.net/agershun/x1gq3wf2/). Run this sample
483
+ Try this sample in [jsFiddle](https://jsfiddle.net/agershun/x1gq3wf2/). Run this sample
556
484
  two or three times, and AlaSQL store more and more data in localStorage. Here, "Atlas" is
557
485
  the name of localStorage database, where "MyAtlas" is a memory AlaSQL database.
558
486
 
@@ -582,20 +510,16 @@ Warning: Alaserver is not multi-threaded, not concurrent, and not secured.
582
510
 
583
511
  ### Regression tests
584
512
 
585
- 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)
586
- of the codebase.
587
-
588
- AlaSQL uses `mocha` for regression tests. Install `mocha` and run
513
+ AlaSQL has more than 2,400 regression tests, but they only cover [![Coverage](https://img.shields.io/codecov/c/github/alasql/alasql/main.svg)](https://rawgit.com/alasql/alasql/main/test/coverage/lcov-report/dist/alasql.fs.js.html) of the codebase. They run with [Bun](https://bun.sh):
589
514
 
590
515
  ```bash
591
- $ npm test
516
+ $ yarn test # builds dist/ and runs the tests
517
+ $ yarn test-browser # runs the tests in a browser
592
518
  ```
593
519
 
594
- or open [test/index.html](test/index.html) for in-browser tests (Please serve via localhost with, for example, `http-server`).
595
-
596
520
  #### Tests with AlaSQL ASSERT from SQL
597
521
 
598
- You can use AlaSQL's [ASSERT](wiki/Assert) operator to test the results of previous operation:
522
+ You can use AlaSQL's [ASSERT](https://github.com/alasql/alasql/wiki/Assert) operator to test the results of previous operation:
599
523
 
600
524
  ```sql
601
525
  CREATE TABLE one (a INT); ASSERT 1;
@@ -607,17 +531,14 @@ SELECT * FROM one ORDER BY a DESC; ASSERT [{a:3},{a:2},{a:1}];
607
531
 
608
532
  AlaSQL uses `SQLLOGICTEST` to test its compatibility with SQL-99. The tests include about 2 million queries and statements.
609
533
 
610
- The testruns can be found in the [testlog](TESTLOG.md).
611
-
612
534
  ## Rebuilding the parser
613
535
 
614
536
  To rebuild the parser, follow these steps:
615
537
 
616
- - Make changes to alasqlparser.jison
617
- - `npm install -g jison`
618
- - `npm run jison`
619
- - `npm test` to validate the changes made
620
- - Commit changes to alasqlparser.jison and alasqlparser.js
538
+ - Make changes to `src/alasqlparser.jison`
539
+ - Run `yarn jison`
540
+ - Run `yarn test` to validate the changes made
541
+ - Commit changes to `src/alasqlparser.jison` and `src/alasqlparser.js`
621
542
 
622
543
  ## Contributing
623
544
 
@@ -631,14 +552,14 @@ Thanks to all the people who already contributed!
631
552
 
632
553
  **Main contributors**
633
554
 
634
- - [Andrey Gershun](https://github.com/alasql)
635
- - [Mathias Rangel Wulff](https://twitter.com/rangelwulff)
555
+ - [Andrey Gershun](https://github.com/agershun)
556
+ - [Mathias Wulff](https://twitter.com/rangelwulff)
636
557
 
637
558
  AlaSQL is an [OPEN Open Source Project](https://openopensource.github.io/). This means that:
638
559
 
639
560
  > 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.
640
561
 
641
- 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)
562
+ 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/main/CONTRIBUTING.md)
642
563
 
643
564
  ## Sponsors
644
565
 
@@ -646,7 +567,7 @@ We extend our heartfelt thanks to each and every sponsor for generously supporti
646
567
 
647
568
  ### Faster GitHub Actions with Blacksmith
648
569
 
649
- [Blacksmith](https://www.blacksmith.sh/?source=alasql) significantly improves the speed of our GitHub Actions workflows by offering more powerful machines and enhanced caching mechanisms. Transitining was a one-line change and it has reduced our automated test times from 70-90 seconds to 15-17 seconds.
570
+ [Blacksmith](https://www.blacksmith.sh/?source=alasql) significantly improves the speed of our GitHub Actions workflows by offering more powerful machines and enhanced caching mechanisms. Transitioning was a one-line change and it has reduced our automated test times from 70-90 seconds to 15-17 seconds.
650
571
 
651
572
  <a href="https://www.blacksmith.sh/?source=alasql">
652
573
  <img src="https://github.com/user-attachments/assets/a85a8a5f-65fd-48e1-aaad-b3f247248928" alt="Blacksmith Logo" width="300">
@@ -691,13 +612,13 @@ and other people for useful tools, which make our work much easier.
691
612
 
692
613
  ### Related projects that have inspired us
693
614
 
694
- - [AlaX](http://github.com/alasql/alax) - Export to Excel with colors and formats
695
- - [AlaMDX](http://github.com/alasql/alamdx) - JavaScript MDX OLAP library (work in progress)
696
- - [Other similar projects](http://github.com/alasql/alasql/wiki/Similar-Projects.md) - list of databases on JavaScript
615
+ - [AlaX](https://github.com/alasql/alax) - Export to Excel with colors and formats
616
+ - [AlaMDX](https://github.com/alasql/alamdx) - JavaScript MDX OLAP library (work in progress)
617
+ - [Other similar projects](https://github.com/alasql/alasql/wiki/Similar-Projects) - list of databases on JavaScript
697
618
 
698
619
  ---
699
620
 
700
- <a href="http://alasql.org"><img src="https://cloud.githubusercontent.com/assets/1063454/14003946/d6e5c076-f156-11e5-8238-e62d2a8d20dc.png" align="right" alt="AlaSQL logo"/></a>
701
- © 2014-2025, Andrey Gershun (agershun@gmail.com) & Mathias Rangel Wulff (m@rawu.dk)
621
+ <a href="https://alasql.org"><img src="https://cloud.githubusercontent.com/assets/1063454/14003946/d6e5c076-f156-11e5-8238-e62d2a8d20dc.png" align="right" alt="AlaSQL logo"/></a>
622
+ © 2014-2026, Andrey Gershun (agershun@gmail.com) & Mathias Wulff (m@rawu.dk)
702
623
 
703
624
  See [this article](https://console.substack.com/p/console-187) for a bit of information about the motivation and background.
package/bin/alasql-cli.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // Command line interface for Alasql
5
5
  // Version: 0.2.3
6
6
  // Date: 28.07.2015
7
- // (c) 2014-2022, Andrey Gershun & Mathias Wulff
7
+ // (c) 2014-2026, Andrey Gershun & Mathias Wulff
8
8
  //
9
9
 
10
10
  let alasql = require('../dist/alasql.fs.js');
@@ -1,15 +1,15 @@
1
- //! AlaSQL v4.23.1 build: develop-dd51011d | © 2014-2025 Andrey Gershun & Mathias Wulff | License: MIT
1
+ //! AlaSQL v4.23.3 build: hotfix.v4.23.3-a06c64c4 | © 2014-2026 Andrey Gershun & Mathias Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 4.23.1
4
+ @version 4.23.3
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
- © 2014-2025 Andrey Gershun & Mathias Wulff
7
+ © 2014-2026 Andrey Gershun & Mathias Wulff
8
8
 
9
9
  @license
10
10
  The MIT License (MIT)
11
11
 
12
- Copyright 2014-2025 Andrey Gershun (agershun@gmail.com) & Mathias Wulff (m@rawu.dk)
12
+ Copyright 2014-2026 Andrey Gershun (agershun@gmail.com) & Mathias Wulff (m@rawu.dk)
13
13
 
14
14
  Permission is hereby granted, free of charge, to any person obtaining a copy
15
15
  of this software and associated documentation files (the "Software"), to deal
@@ -28,4 +28,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
28
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
29
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
30
  SOFTWARE.
31
- */(function(e,f){typeof define=="function"&&define.amd?define([],f):typeof exports=="object"?module.exports=f():e.alasql=f()})(this,function(){function e(r,n,i){n=n||[],typeof n=="function"&&(scope=i,i=n,n=[]),typeof n!="object"&&(n=[n]);var o=e.lastid++;e.buffer[o]=i,e.webworker.postMessage({id:o,sql:r,params:n})}if(e.options={},e.options.progress=function(){},isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"},e.promise=function(){throw new Error("Please include a Promise/A+ library")},typeof Promise<"u"){var f=function(r,n,i,o){return new Promise(function(t,s){e(r,n,function(u,l){l?s(l):(i&&o&&e.options.progress!==!1&&e.options.progress(i,o),t(u))})})},w=function(r){if(!(r.length<1)){for(var n,i,o,t=[],s=0;s<r.length;s++){if(n=r[s],typeof n=="string"&&(n=[n]),!isArray(n)||n.length<1||2<n.length)throw new Error("Error in .promise parameter");i=n[0],o=n[1]||void 0,t.push(f(i,o,s,r.length))}return Promise.all(t)}};e.promise=function(r,n){if(typeof Promise>"u")throw new Error("Please include a Promise/A+ library");if(typeof r=="string")return f(r,n);if(!isArray(r)||r.length<1||typeof n<"u")throw new Error("Error in .promise parameters");return w(r)}}if(e=e||!1,!e)throw new Error("alasql was not found");return e.worker=function(){throw new Error("Can find webworker in this enviroment")},typeof Worker<"u"&&(e.worker=function(r,n,i){if(r===!0&&(r=void 0),typeof r>"u"){for(var o=document.getElementsByTagName("script"),t=0;t<o.length;t++)if(o[t].src.substr(-16).toLowerCase()==="alasql-worker.js"){r=o[t].src.substr(0,o[t].src.length-16)+"alasql.js";break}else if(o[t].src.substr(-20).toLowerCase()==="alasql-worker.min.js"){r=o[t].src.substr(0,o[t].src.length-20)+"alasql.min.js";break}else if(o[t].src.substr(-9).toLowerCase()==="alasql.js"){r=o[t].src;break}else if(o[t].src.substr(-13).toLowerCase()==="alasql.min.js"){r=o[t].src.substr(0,o[t].src.length-13)+"alasql.min.js";break}}if(typeof r>"u")throw new Error("Path to alasql.js is not specified");if(r!==!1){var s="importScripts('";s+=r,s+="');self.onmessage = function(event) {alasql(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}";var u=new Blob([s],{type:"text/plain"});if(e.webworker=new Worker(URL.createObjectURL(u)),e.webworker.onmessage=function(a){var d=a.data.id;e.buffer[d](a.data.data),delete e.buffer[d]},e.webworker.onerror=function(a){throw a},arguments.length>1){var l="REQUIRE "+n.map(function(a){return'"'+a+'"'}).join(",");e(l,[],i)}}else if(r===!1){delete e.webworker;return}}),e.lastid=0,e.buffer={},e.worker(),e});
31
+ */
32
+ (function(root,factory){if(typeof define==="function"&&define.amd){define([],factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.alasql=factory()}})(this,function(){var module={exports:{}},exports=module.exports;var d=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var j=(r,e,t)=>()=>{if(t)throw t[0];try{return r&&(e=r(r=0)),e}catch(i){throw t=[i],i}};var m=(r,e)=>{for(var t in e)d(r,t,{get:e[t],enumerable:!0})},E=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of p(e))!h.call(r,n)&&n!==t&&d(r,n,{get:()=>e[n],enumerable:!(i=y(e,n))||i.enumerable});return r};var L=r=>E(d({},"__esModule",{value:!0}),r);var c={};m(c,{default:()=>b});function b(r){if(r=r||!1,!r)throw new Error("alasql was not found");r.worker=function(){throw new Error("Can find webworker in this enviroment")},typeof Worker<"u"&&(r.worker=function(e,t,i){if(e===!0&&(e=void 0),typeof e>"u"){for(var n=document.getElementsByTagName("script"),o=0;o<n.length;o++)if(n[o].src.substr(-16).toLowerCase()==="alasql-worker.js"){e=n[o].src.substr(0,n[o].src.length-16)+"alasql.js";break}else if(n[o].src.substr(-20).toLowerCase()==="alasql-worker.min.js"){e=n[o].src.substr(0,n[o].src.length-20)+"alasql.min.js";break}else if(n[o].src.substr(-9).toLowerCase()==="alasql.js"){e=n[o].src;break}else if(n[o].src.substr(-13).toLowerCase()==="alasql.min.js"){e=n[o].src.substr(0,n[o].src.length-13)+"alasql.min.js";break}}if(typeof e>"u")throw new Error("Path to alasql.js is not specified");if(e!==!1){var u="importScripts('";u+=e,u+="');self.onmessage = function(event) {alasql(event.data.sql,event.data.params, function(data){postMessage({id:event.data.id, data:data});});}";var a=new Blob([u],{type:"text/plain"});if(r.webworker=new Worker(URL.createObjectURL(a)),r.webworker.onmessage=function(s){var l=s.data.id;r.buffer[l](s.data.data),delete r.buffer[l]},r.webworker.onerror=function(s){throw s},arguments.length>1){var v="REQUIRE "+t.map(function(s){return'"'+s+'"'}).join(",");r(v,[],i)}}else if(e===!1){delete r.webworker;return}})}var g=j(()=>{});function f(r,e,t){e=e||[],typeof e=="function"&&(scope=t,t=e,e=[]),typeof e!="object"&&(e=[e]);var i=f.lastid++;f.buffer[i]=t,f.webworker.postMessage({id:i,sql:r,params:e})}f.options={};f.options.progress=function(){};isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"};f.promise=function(){throw new Error("Please include a Promise/A+ library")};typeof Promise<"u"&&(w=function(r,e,t,i){return new Promise(function(n,o){f(r,e,function(u,a){a?o(a):(t&&i&&f.options.progress!==!1&&f.options.progress(t,i),n(u))})})},k=function(r){if(!(r.length<1)){for(var e,t,i,n=[],o=0;o<r.length;o++){if(e=r[o],typeof e=="string"&&(e=[e]),!isArray(e)||e.length<1||2<e.length)throw new Error("Error in .promise parameter");t=e[0],i=e[1]||void 0,n.push(w(t,i,o,r.length))}return Promise.all(n)}},f.promise=function(r,e){if(typeof Promise>"u")throw new Error("Please include a Promise/A+ library");if(typeof r=="string")return w(r,e);if(!isArray(r)||r.length<1||typeof e<"u")throw new Error("Error in .promise parameters");return k(r)});var w,k;(g(),L(c)).default(f);f.lastid=0;f.buffer={};f.worker();module.exports=f;
33
+
34
+ return module.exports});
package/dist/alasql.d.ts CHANGED
@@ -37,6 +37,12 @@ declare module 'alasql' {
37
37
  sqlite: boolean;
38
38
  orientdb: boolean;
39
39
  excel?: xlsx.WorkBook; // now typed
40
+ progress: false | ((a: number, b: number) => void); // called while an async batch runs, or false for none
41
+ joinstar: 'overwrite' | 'underscore' | 'json'; // how SELECT * names the columns of joined tables
42
+ loopbreak: number; // maximum steps of a SEARCH before it stops
43
+ maxCteIterations: number; // maximum iterations of a recursive CTE
44
+ dateAsString: boolean; // GETDATE() and NOW() return a string instead of a Date
45
+ csvStringToNumber: boolean; // convert numeric strings to numbers when reading CSV
40
46
  }
41
47
 
42
48
  // compiled Statement