alasql 2.5.0 → 2.5.1
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/dist/alasql-worker.js +2 -2
- package/dist/alasql-worker.min.js +1 -1
- package/dist/alasql.d.ts +3 -3
- package/dist/alasql.fs.js +61 -43
- package/dist/alasql.js +61 -43
- package/dist/alasql.min.js +2 -2
- package/package.json +7 -5
- package/types/alasql.d.ts +3 -3
- package/dist/es5/alasql.fs.js +0 -60102
- package/dist/es5/alasql.js +0 -60114
- package/dist/es5/alasql.min.js +0 -2
package/dist/alasql-worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v2.
|
|
1
|
+
//! AlaSQL v2.5.0 build: develop-dcdd4683 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 2.
|
|
4
|
+
@version 2.5.0
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2023 Andrey Gershun & Mathias Wulff
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
//! AlaSQL v2.
|
|
1
|
+
//! AlaSQL v2.5.0 build: develop-dcdd4683 | © 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.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Project: https://github.com/
|
|
1
|
+
// Project: https://github.com/alasql/alasql
|
|
2
2
|
|
|
3
3
|
import * as xlsx from 'xlsx';
|
|
4
4
|
|
|
@@ -56,14 +56,14 @@ declare namespace alaSQLSpace {
|
|
|
56
56
|
catch<U>(onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
// see https://github.com/
|
|
59
|
+
// see https://github.com/alasql/alasql/wiki/User%20Defined%20Functions
|
|
60
60
|
interface userDefinedFunction {
|
|
61
61
|
(...x: any[]): any;
|
|
62
62
|
}
|
|
63
63
|
interface userDefinedFunctionLookUp {
|
|
64
64
|
[x: string]: userDefinedFunction;
|
|
65
65
|
}
|
|
66
|
-
// see https://github.com/
|
|
66
|
+
// see https://github.com/alasql/alasql/wiki/User%20Defined%20Functions
|
|
67
67
|
interface userAggregator {
|
|
68
68
|
(value: any, accumulator: any, stage: number): any;
|
|
69
69
|
}
|
package/dist/alasql.fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v2.
|
|
1
|
+
//! AlaSQL v2.5.0 build: develop-dcdd4683 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 2.
|
|
4
|
+
@version 2.5.0
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2023 Andrey Gershun & Mathias Wulff
|
|
@@ -36,7 +36,7 @@ SOFTWARE.
|
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
@fileoverview AlaSQL JavaScript SQL library
|
|
39
|
-
@see http://github.com/
|
|
39
|
+
@see http://github.com/alasql/alasql
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -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 = '2.
|
|
146
|
-
alasql.build = 'develop-
|
|
145
|
+
alasql.version = '2.5.0';
|
|
146
|
+
alasql.build = 'develop-dcdd4683';
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
Debug flag
|
|
@@ -4480,61 +4480,79 @@ alasql.databasenum = 0;
|
|
|
4480
4480
|
/**
|
|
4481
4481
|
Alasql options object
|
|
4482
4482
|
*/
|
|
4483
|
-
alasql.options = {
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
alasql.options.dropifnotexists = false; // DROP database in any case
|
|
4487
|
-
alasql.options.datetimeformat = 'sql'; // How to handle DATE and DATETIME types
|
|
4488
|
-
// Another value is 'javascript'
|
|
4489
|
-
alasql.options.casesensitive = true; // Table and column names are case sensitive and converted to lower-case
|
|
4490
|
-
alasql.options.logtarget = 'output'; // target for log. Values: 'console', 'output', 'id' of html tag
|
|
4491
|
-
alasql.options.logprompt = true; // Print SQL at log
|
|
4483
|
+
alasql.options = {
|
|
4484
|
+
/** Log or throw error */
|
|
4485
|
+
errorlog: false,
|
|
4492
4486
|
|
|
4493
|
-
|
|
4487
|
+
/** Use valueof in orderfn */
|
|
4488
|
+
valueof: false,
|
|
4494
4489
|
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
alasql.options.modifier = undefined;
|
|
4498
|
-
// How many rows to lookup to define columns
|
|
4499
|
-
alasql.options.columnlookup = 10;
|
|
4500
|
-
// Create vertex if not found
|
|
4501
|
-
alasql.options.autovertex = true;
|
|
4490
|
+
/** DROP database in any case */
|
|
4491
|
+
dropifnotexists: false,
|
|
4502
4492
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4493
|
+
/** How to handle DATE and DATETIME types */
|
|
4494
|
+
datetimeformat: 'sql',
|
|
4505
4495
|
|
|
4506
|
-
|
|
4507
|
-
|
|
4496
|
+
/** Table and column names are case sensitive and converted to lower-case */
|
|
4497
|
+
casesensitive: true,
|
|
4508
4498
|
|
|
4509
|
-
|
|
4510
|
-
|
|
4499
|
+
/** target for log. Values: 'console', 'output', 'id' of html tag */
|
|
4500
|
+
logtarget: 'output',
|
|
4511
4501
|
|
|
4512
|
-
|
|
4513
|
-
|
|
4502
|
+
/** Print SQL at log */
|
|
4503
|
+
logprompt: true,
|
|
4514
4504
|
|
|
4515
|
-
|
|
4505
|
+
/** Callback for async queries progress */
|
|
4506
|
+
progress: false,
|
|
4516
4507
|
|
|
4517
|
-
|
|
4508
|
+
/**
|
|
4509
|
+
* Default modifier
|
|
4510
|
+
* values: RECORDSET, VALUE, ROW, COLUMN, MATRIX, TEXTSTRING, INDEX
|
|
4511
|
+
* @type {'RECORDSET'|'VALUE'|'ROW'|'COLUMN'|'MATRIX'|'TEXTSTRING'|'INDEX'|undefined}
|
|
4512
|
+
*/
|
|
4513
|
+
modifier: undefined,
|
|
4514
|
+
|
|
4515
|
+
/** How many rows to lookup to define columns */
|
|
4516
|
+
columnlookup: 10,
|
|
4517
|
+
|
|
4518
|
+
/** Create vertex if not found */
|
|
4519
|
+
autovertex: true,
|
|
4520
|
+
|
|
4521
|
+
/** Use dbo as current database (for partial T-SQL comaptibility) */
|
|
4522
|
+
usedbo: true,
|
|
4518
4523
|
|
|
4519
|
-
|
|
4524
|
+
/** AUTOCOMMIT ON | OFF */
|
|
4525
|
+
autocommit: true,
|
|
4520
4526
|
|
|
4521
|
-
|
|
4527
|
+
/** Use cache */
|
|
4528
|
+
cache: true,
|
|
4522
4529
|
|
|
4523
|
-
|
|
4530
|
+
/** Compatibility flags */
|
|
4531
|
+
tsql: true,
|
|
4524
4532
|
|
|
4525
|
-
|
|
4526
|
-
alasql.options.nocount = false;
|
|
4533
|
+
mysql: true,
|
|
4527
4534
|
|
|
4528
|
-
|
|
4529
|
-
alasql.options.nan = false;
|
|
4535
|
+
postgres: true,
|
|
4530
4536
|
|
|
4531
|
-
|
|
4537
|
+
oracle: true,
|
|
4532
4538
|
|
|
4533
|
-
|
|
4539
|
+
sqlite: true,
|
|
4534
4540
|
|
|
4535
|
-
|
|
4541
|
+
orientdb: true,
|
|
4536
4542
|
|
|
4537
|
-
|
|
4543
|
+
/** for SET NOCOUNT OFF */
|
|
4544
|
+
nocount: false,
|
|
4545
|
+
|
|
4546
|
+
/** Check for NaN and convert it to undefined */
|
|
4547
|
+
nan: false,
|
|
4548
|
+
|
|
4549
|
+
excel: {cellDates: true},
|
|
4550
|
+
|
|
4551
|
+
/** Option for SELECT * FROM a,b */
|
|
4552
|
+
joinstar: 'overwrite',
|
|
4553
|
+
|
|
4554
|
+
loopbreak: 100000,
|
|
4555
|
+
};
|
|
4538
4556
|
|
|
4539
4557
|
//alasql.options.worker = false;
|
|
4540
4558
|
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v2.
|
|
1
|
+
//! AlaSQL v2.5.0 build: develop-dcdd4683 | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 2.
|
|
4
|
+
@version 2.5.0
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2023 Andrey Gershun & Mathias Wulff
|
|
@@ -36,7 +36,7 @@ SOFTWARE.
|
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
@fileoverview AlaSQL JavaScript SQL library
|
|
39
|
-
@see http://github.com/
|
|
39
|
+
@see http://github.com/alasql/alasql
|
|
40
40
|
*/
|
|
41
41
|
|
|
42
42
|
/**
|
|
@@ -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 = '2.
|
|
146
|
-
alasql.build = 'develop-
|
|
145
|
+
alasql.version = '2.5.0';
|
|
146
|
+
alasql.build = 'develop-dcdd4683';
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
Debug flag
|
|
@@ -4480,61 +4480,79 @@ alasql.databasenum = 0;
|
|
|
4480
4480
|
/**
|
|
4481
4481
|
Alasql options object
|
|
4482
4482
|
*/
|
|
4483
|
-
alasql.options = {
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
alasql.options.dropifnotexists = false; // DROP database in any case
|
|
4487
|
-
alasql.options.datetimeformat = 'sql'; // How to handle DATE and DATETIME types
|
|
4488
|
-
// Another value is 'javascript'
|
|
4489
|
-
alasql.options.casesensitive = true; // Table and column names are case sensitive and converted to lower-case
|
|
4490
|
-
alasql.options.logtarget = 'output'; // target for log. Values: 'console', 'output', 'id' of html tag
|
|
4491
|
-
alasql.options.logprompt = true; // Print SQL at log
|
|
4483
|
+
alasql.options = {
|
|
4484
|
+
/** Log or throw error */
|
|
4485
|
+
errorlog: false,
|
|
4492
4486
|
|
|
4493
|
-
|
|
4487
|
+
/** Use valueof in orderfn */
|
|
4488
|
+
valueof: false,
|
|
4494
4489
|
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
alasql.options.modifier = undefined;
|
|
4498
|
-
// How many rows to lookup to define columns
|
|
4499
|
-
alasql.options.columnlookup = 10;
|
|
4500
|
-
// Create vertex if not found
|
|
4501
|
-
alasql.options.autovertex = true;
|
|
4490
|
+
/** DROP database in any case */
|
|
4491
|
+
dropifnotexists: false,
|
|
4502
4492
|
|
|
4503
|
-
|
|
4504
|
-
|
|
4493
|
+
/** How to handle DATE and DATETIME types */
|
|
4494
|
+
datetimeformat: 'sql',
|
|
4505
4495
|
|
|
4506
|
-
|
|
4507
|
-
|
|
4496
|
+
/** Table and column names are case sensitive and converted to lower-case */
|
|
4497
|
+
casesensitive: true,
|
|
4508
4498
|
|
|
4509
|
-
|
|
4510
|
-
|
|
4499
|
+
/** target for log. Values: 'console', 'output', 'id' of html tag */
|
|
4500
|
+
logtarget: 'output',
|
|
4511
4501
|
|
|
4512
|
-
|
|
4513
|
-
|
|
4502
|
+
/** Print SQL at log */
|
|
4503
|
+
logprompt: true,
|
|
4514
4504
|
|
|
4515
|
-
|
|
4505
|
+
/** Callback for async queries progress */
|
|
4506
|
+
progress: false,
|
|
4516
4507
|
|
|
4517
|
-
|
|
4508
|
+
/**
|
|
4509
|
+
* Default modifier
|
|
4510
|
+
* values: RECORDSET, VALUE, ROW, COLUMN, MATRIX, TEXTSTRING, INDEX
|
|
4511
|
+
* @type {'RECORDSET'|'VALUE'|'ROW'|'COLUMN'|'MATRIX'|'TEXTSTRING'|'INDEX'|undefined}
|
|
4512
|
+
*/
|
|
4513
|
+
modifier: undefined,
|
|
4514
|
+
|
|
4515
|
+
/** How many rows to lookup to define columns */
|
|
4516
|
+
columnlookup: 10,
|
|
4517
|
+
|
|
4518
|
+
/** Create vertex if not found */
|
|
4519
|
+
autovertex: true,
|
|
4520
|
+
|
|
4521
|
+
/** Use dbo as current database (for partial T-SQL comaptibility) */
|
|
4522
|
+
usedbo: true,
|
|
4518
4523
|
|
|
4519
|
-
|
|
4524
|
+
/** AUTOCOMMIT ON | OFF */
|
|
4525
|
+
autocommit: true,
|
|
4520
4526
|
|
|
4521
|
-
|
|
4527
|
+
/** Use cache */
|
|
4528
|
+
cache: true,
|
|
4522
4529
|
|
|
4523
|
-
|
|
4530
|
+
/** Compatibility flags */
|
|
4531
|
+
tsql: true,
|
|
4524
4532
|
|
|
4525
|
-
|
|
4526
|
-
alasql.options.nocount = false;
|
|
4533
|
+
mysql: true,
|
|
4527
4534
|
|
|
4528
|
-
|
|
4529
|
-
alasql.options.nan = false;
|
|
4535
|
+
postgres: true,
|
|
4530
4536
|
|
|
4531
|
-
|
|
4537
|
+
oracle: true,
|
|
4532
4538
|
|
|
4533
|
-
|
|
4539
|
+
sqlite: true,
|
|
4534
4540
|
|
|
4535
|
-
|
|
4541
|
+
orientdb: true,
|
|
4536
4542
|
|
|
4537
|
-
|
|
4543
|
+
/** for SET NOCOUNT OFF */
|
|
4544
|
+
nocount: false,
|
|
4545
|
+
|
|
4546
|
+
/** Check for NaN and convert it to undefined */
|
|
4547
|
+
nan: false,
|
|
4548
|
+
|
|
4549
|
+
excel: {cellDates: true},
|
|
4550
|
+
|
|
4551
|
+
/** Option for SELECT * FROM a,b */
|
|
4552
|
+
joinstar: 'overwrite',
|
|
4553
|
+
|
|
4554
|
+
loopbreak: 100000,
|
|
4555
|
+
};
|
|
4538
4556
|
|
|
4539
4557
|
//alasql.options.worker = false;
|
|
4540
4558
|
|