alasql 4.3.4 → 4.4.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/bin/alasql-cli.js +1 -1
- package/dist/alasql-worker.js +2 -2
- package/dist/alasql.fs.js +124 -34
- package/dist/alasql.js +124 -34
- package/dist/alasql.min.js +146 -93
- package/package.json +1 -1
package/bin/alasql-cli.js
CHANGED
package/dist/alasql-worker.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.
|
|
1
|
+
//! AlaSQL v4.4.1 build: develop-b9447ae3 | © 2014-2024 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.
|
|
4
|
+
@version 4.4.1
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2024 Andrey Gershun & Mathias Wulff
|
package/dist/alasql.fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.
|
|
1
|
+
//! AlaSQL v4.4.1 build: develop-b9447ae3 | © 2014-2024 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.
|
|
4
|
+
@version 4.4.1
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2024 Andrey Gershun & Mathias Wulff
|
|
@@ -141,8 +141,8 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.
|
|
145
|
-
alasql.build = 'develop-
|
|
144
|
+
alasql.version = '4.4.1';
|
|
145
|
+
alasql.build = 'develop-b9447ae3';
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
Debug flag
|
|
@@ -3781,7 +3781,7 @@ utils.autoExtFilename = function (filename, ext, config) {
|
|
|
3781
3781
|
config = config || {};
|
|
3782
3782
|
if (
|
|
3783
3783
|
typeof filename !== 'string' ||
|
|
3784
|
-
filename.match(/^[A-
|
|
3784
|
+
filename.match(/^[A-Z]+:\/\/|\n|\..{2,6}$/i) ||
|
|
3785
3785
|
config.autoExt === 0 ||
|
|
3786
3786
|
config.autoExt === false
|
|
3787
3787
|
) {
|
|
@@ -8469,27 +8469,52 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8469
8469
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8470
8470
|
return (
|
|
8471
8471
|
pre +
|
|
8472
|
-
`
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8472
|
+
`
|
|
8473
|
+
{
|
|
8474
|
+
const __g_colas = g['${colas}'];
|
|
8475
|
+
const __typeof_colexp1 = typeof ${colexp1};
|
|
8476
|
+
|
|
8477
|
+
if (__g_colas == null && ${colexp1} == null) {
|
|
8478
|
+
g['${colas}'] = null;
|
|
8479
|
+
} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 !== 'object' && __typeof_colexp1 !== 'number') ||
|
|
8480
|
+
(__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${colexp1} == null || (__typeof_colexp1 !== 'number' && __typeof_colexp1 !== 'object'))) {
|
|
8481
|
+
g['${colas}'] = null;
|
|
8482
|
+
} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 == 'number') ||
|
|
8483
|
+
(__g_colas == null && __typeof_colexp1 == 'number')) {
|
|
8484
|
+
g['${colas}'] = ${colexp};
|
|
8485
|
+
} else if (typeof __g_colas == 'number' && ${colexp1} == null) {
|
|
8486
|
+
g['${colas}'] = __g_colas;
|
|
8487
|
+
} else {
|
|
8488
|
+
g['${colas}'] += ${colexp} || 0;
|
|
8489
|
+
}
|
|
8490
|
+
}
|
|
8491
|
+
` +
|
|
8480
8492
|
post
|
|
8481
8493
|
);
|
|
8482
8494
|
}
|
|
8483
8495
|
return (
|
|
8484
8496
|
pre +
|
|
8485
|
-
`
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8497
|
+
`
|
|
8498
|
+
{
|
|
8499
|
+
const __g_colas = g['${colas}'];
|
|
8500
|
+
const __typeof_colexp = typeof ${colexp};
|
|
8501
|
+
|
|
8502
|
+
if (__g_colas == null && ${colexp} == null) {
|
|
8503
|
+
g['${colas}'] = null;
|
|
8504
|
+
} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp !== 'object' && __typeof_colexp !== 'number') ||
|
|
8505
|
+
(__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${colexp} == null || (__typeof_colexp !== 'number' && __typeof_colexp !== 'object'))) {
|
|
8506
|
+
g['${colas}'] = null;
|
|
8507
|
+
} else if (typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp == 'number') {
|
|
8508
|
+
g['${colas}'] = ${colexp};
|
|
8509
|
+
} else if (typeof __g_colas == 'number' && ${colexp} == null) {
|
|
8510
|
+
g['${colas}'] = __g_colas;
|
|
8511
|
+
} else if (__g_colas == null && __typeof_colexp == 'number') {
|
|
8512
|
+
g['${colas}'] = ${colexp};
|
|
8513
|
+
} else {
|
|
8514
|
+
g['${colas}'] += ${colexp} || 0;
|
|
8515
|
+
}
|
|
8516
|
+
}
|
|
8517
|
+
` +
|
|
8493
8518
|
post
|
|
8494
8519
|
);
|
|
8495
8520
|
} else if (col.aggregatorid === 'TOTAL') {
|
|
@@ -8497,23 +8522,51 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8497
8522
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8498
8523
|
return (
|
|
8499
8524
|
pre +
|
|
8500
|
-
`
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8525
|
+
`{
|
|
8526
|
+
const __g_colas = g['${colas}'];
|
|
8527
|
+
const __colexp1 = ${colexp1};
|
|
8528
|
+
const __typeof_g_colas = typeof __g_colas;
|
|
8529
|
+
const __typeof_colexp1 = typeof __colexp1;
|
|
8530
|
+
|
|
8531
|
+
if (__typeof_g_colas == 'string' && !isNaN(__g_colas) && typeof Number(__g_colas) == 'number' &&
|
|
8532
|
+
__typeof_colexp1 == 'string' && !isNaN(__colexp1) && typeof Number(__colexp1) == 'number') {
|
|
8533
|
+
g['${colas}'] = Number(__g_colas) + Number(__colexp1);
|
|
8534
|
+
} else if (__typeof_g_colas == 'string' && __typeof_colexp1 == 'string') {
|
|
8535
|
+
g['${colas}'] = 0;
|
|
8536
|
+
} else if (__typeof_g_colas == 'string' && __typeof_colexp1 == 'number') {
|
|
8537
|
+
g['${colas}'] = __colexp1;
|
|
8538
|
+
} else if (__typeof_colexp1 == 'string' && __typeof_g_colas == 'number') {
|
|
8539
|
+
g['${colas}'] = __g_colas;
|
|
8540
|
+
} else {
|
|
8541
|
+
g['${colas}'] += __colexp1 || 0;
|
|
8542
|
+
}
|
|
8543
|
+
}` +
|
|
8506
8544
|
post
|
|
8507
8545
|
);
|
|
8508
8546
|
}
|
|
8509
8547
|
return (
|
|
8510
8548
|
pre +
|
|
8511
|
-
`
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8549
|
+
`{
|
|
8550
|
+
const __g_colas = g['${colas}'];
|
|
8551
|
+
const __colexp = ${colexp};
|
|
8552
|
+
const __typeof_g_colas = typeof __g_colas;
|
|
8553
|
+
const __typeof_colexp = typeof __colexp;
|
|
8554
|
+
|
|
8555
|
+
if (__typeof_g_colas === 'string' && !isNaN(__g_colas) && typeof Number(__g_colas) === 'number' &&
|
|
8556
|
+
__typeof_colexp === 'string' && !isNaN(__colexp) && typeof Number(__colexp) === 'number') {
|
|
8557
|
+
g['${colas}'] = Number(__g_colas) + Number(__colexp);
|
|
8558
|
+
} else if (__typeof_g_colas === 'string' && __typeof_colexp === 'string') {
|
|
8559
|
+
g['${colas}'] = 0;
|
|
8560
|
+
} else if (__typeof_g_colas === 'string' && __typeof_colexp === 'number') {
|
|
8561
|
+
g['${colas}'] = __colexp;
|
|
8562
|
+
} else if (__typeof_colexp === 'string' && __typeof_g_colas === 'number') {
|
|
8563
|
+
g['${colas}'] = __g_colas;
|
|
8564
|
+
} else {
|
|
8565
|
+
g['${colas}'] += __colexp || 0;
|
|
8566
|
+
}
|
|
8567
|
+
}
|
|
8568
|
+
|
|
8569
|
+
` +
|
|
8517
8570
|
post
|
|
8518
8571
|
);
|
|
8519
8572
|
} else if (col.aggregatorid === 'COUNT') {
|
|
@@ -16258,10 +16311,47 @@ alasql.from.JSON = function (filename, opts, cb, idx, query) {
|
|
|
16258
16311
|
if (cb) {
|
|
16259
16312
|
res = cb(res, idx, query);
|
|
16260
16313
|
}
|
|
16261
|
-
})
|
|
16314
|
+
}),
|
|
16315
|
+
err => {
|
|
16316
|
+
throw new Error(err);
|
|
16317
|
+
};
|
|
16262
16318
|
return res;
|
|
16263
16319
|
};
|
|
16264
16320
|
|
|
16321
|
+
const jsonl = ext => {
|
|
16322
|
+
return function (filename, opts, cb, idx, query) {
|
|
16323
|
+
let out = [];
|
|
16324
|
+
filename = alasql.utils.autoExtFilename(filename, ext, opts);
|
|
16325
|
+
alasql.utils.loadFile(
|
|
16326
|
+
filename,
|
|
16327
|
+
!!cb,
|
|
16328
|
+
function (data) {
|
|
16329
|
+
data.split(/\r?\n/).forEach((line, ix) => {
|
|
16330
|
+
const trimmed = line.trim();
|
|
16331
|
+
if (trimmed !== '') {
|
|
16332
|
+
// skip empty lines, we do not use filter on an input, as we want to preserve line numbers
|
|
16333
|
+
try {
|
|
16334
|
+
out.push(JSON.parse(trimmed));
|
|
16335
|
+
} catch (e) {
|
|
16336
|
+
throw new Error(`Could not parse JSON at line ${ix}: ${e.toString()}`);
|
|
16337
|
+
}
|
|
16338
|
+
}
|
|
16339
|
+
});
|
|
16340
|
+
if (cb) {
|
|
16341
|
+
res = cb(out, idx, query);
|
|
16342
|
+
}
|
|
16343
|
+
},
|
|
16344
|
+
err => {
|
|
16345
|
+
throw new Error(err);
|
|
16346
|
+
}
|
|
16347
|
+
);
|
|
16348
|
+
return out;
|
|
16349
|
+
};
|
|
16350
|
+
};
|
|
16351
|
+
|
|
16352
|
+
alasql.from.JSONL = jsonl('jsonl');
|
|
16353
|
+
alasql.from.NDJSON = jsonl('ndjson');
|
|
16354
|
+
|
|
16265
16355
|
alasql.from.TXT = function (filename, opts, cb, idx, query) {
|
|
16266
16356
|
var res;
|
|
16267
16357
|
filename = alasql.utils.autoExtFilename(filename, 'txt', opts);
|
package/dist/alasql.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.
|
|
1
|
+
//! AlaSQL v4.4.1 build: develop-b9447ae3 | © 2014-2024 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.
|
|
4
|
+
@version 4.4.1
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2024 Andrey Gershun & Mathias Wulff
|
|
@@ -141,8 +141,8 @@ SOFTWARE.
|
|
|
141
141
|
Current version of alasql
|
|
142
142
|
@constant {string}
|
|
143
143
|
*/
|
|
144
|
-
alasql.version = '4.
|
|
145
|
-
alasql.build = 'develop-
|
|
144
|
+
alasql.version = '4.4.1';
|
|
145
|
+
alasql.build = 'develop-b9447ae3';
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
Debug flag
|
|
@@ -3781,7 +3781,7 @@ utils.autoExtFilename = function (filename, ext, config) {
|
|
|
3781
3781
|
config = config || {};
|
|
3782
3782
|
if (
|
|
3783
3783
|
typeof filename !== 'string' ||
|
|
3784
|
-
filename.match(/^[A-
|
|
3784
|
+
filename.match(/^[A-Z]+:\/\/|\n|\..{2,6}$/i) ||
|
|
3785
3785
|
config.autoExt === 0 ||
|
|
3786
3786
|
config.autoExt === false
|
|
3787
3787
|
) {
|
|
@@ -8469,27 +8469,52 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8469
8469
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8470
8470
|
return (
|
|
8471
8471
|
pre +
|
|
8472
|
-
`
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8472
|
+
`
|
|
8473
|
+
{
|
|
8474
|
+
const __g_colas = g['${colas}'];
|
|
8475
|
+
const __typeof_colexp1 = typeof ${colexp1};
|
|
8476
|
+
|
|
8477
|
+
if (__g_colas == null && ${colexp1} == null) {
|
|
8478
|
+
g['${colas}'] = null;
|
|
8479
|
+
} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 !== 'object' && __typeof_colexp1 !== 'number') ||
|
|
8480
|
+
(__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${colexp1} == null || (__typeof_colexp1 !== 'number' && __typeof_colexp1 !== 'object'))) {
|
|
8481
|
+
g['${colas}'] = null;
|
|
8482
|
+
} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp1 == 'number') ||
|
|
8483
|
+
(__g_colas == null && __typeof_colexp1 == 'number')) {
|
|
8484
|
+
g['${colas}'] = ${colexp};
|
|
8485
|
+
} else if (typeof __g_colas == 'number' && ${colexp1} == null) {
|
|
8486
|
+
g['${colas}'] = __g_colas;
|
|
8487
|
+
} else {
|
|
8488
|
+
g['${colas}'] += ${colexp} || 0;
|
|
8489
|
+
}
|
|
8490
|
+
}
|
|
8491
|
+
` +
|
|
8480
8492
|
post
|
|
8481
8493
|
);
|
|
8482
8494
|
}
|
|
8483
8495
|
return (
|
|
8484
8496
|
pre +
|
|
8485
|
-
`
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8497
|
+
`
|
|
8498
|
+
{
|
|
8499
|
+
const __g_colas = g['${colas}'];
|
|
8500
|
+
const __typeof_colexp = typeof ${colexp};
|
|
8501
|
+
|
|
8502
|
+
if (__g_colas == null && ${colexp} == null) {
|
|
8503
|
+
g['${colas}'] = null;
|
|
8504
|
+
} else if ((typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp !== 'object' && __typeof_colexp !== 'number') ||
|
|
8505
|
+
(__g_colas == null || (typeof __g_colas !== 'number' && typeof __g_colas !== 'object')) && (${colexp} == null || (__typeof_colexp !== 'number' && __typeof_colexp !== 'object'))) {
|
|
8506
|
+
g['${colas}'] = null;
|
|
8507
|
+
} else if (typeof __g_colas !== 'object' && typeof __g_colas !== 'number' && __typeof_colexp == 'number') {
|
|
8508
|
+
g['${colas}'] = ${colexp};
|
|
8509
|
+
} else if (typeof __g_colas == 'number' && ${colexp} == null) {
|
|
8510
|
+
g['${colas}'] = __g_colas;
|
|
8511
|
+
} else if (__g_colas == null && __typeof_colexp == 'number') {
|
|
8512
|
+
g['${colas}'] = ${colexp};
|
|
8513
|
+
} else {
|
|
8514
|
+
g['${colas}'] += ${colexp} || 0;
|
|
8515
|
+
}
|
|
8516
|
+
}
|
|
8517
|
+
` +
|
|
8493
8518
|
post
|
|
8494
8519
|
);
|
|
8495
8520
|
} else if (col.aggregatorid === 'TOTAL') {
|
|
@@ -8497,23 +8522,51 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8497
8522
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8498
8523
|
return (
|
|
8499
8524
|
pre +
|
|
8500
|
-
`
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8525
|
+
`{
|
|
8526
|
+
const __g_colas = g['${colas}'];
|
|
8527
|
+
const __colexp1 = ${colexp1};
|
|
8528
|
+
const __typeof_g_colas = typeof __g_colas;
|
|
8529
|
+
const __typeof_colexp1 = typeof __colexp1;
|
|
8530
|
+
|
|
8531
|
+
if (__typeof_g_colas == 'string' && !isNaN(__g_colas) && typeof Number(__g_colas) == 'number' &&
|
|
8532
|
+
__typeof_colexp1 == 'string' && !isNaN(__colexp1) && typeof Number(__colexp1) == 'number') {
|
|
8533
|
+
g['${colas}'] = Number(__g_colas) + Number(__colexp1);
|
|
8534
|
+
} else if (__typeof_g_colas == 'string' && __typeof_colexp1 == 'string') {
|
|
8535
|
+
g['${colas}'] = 0;
|
|
8536
|
+
} else if (__typeof_g_colas == 'string' && __typeof_colexp1 == 'number') {
|
|
8537
|
+
g['${colas}'] = __colexp1;
|
|
8538
|
+
} else if (__typeof_colexp1 == 'string' && __typeof_g_colas == 'number') {
|
|
8539
|
+
g['${colas}'] = __g_colas;
|
|
8540
|
+
} else {
|
|
8541
|
+
g['${colas}'] += __colexp1 || 0;
|
|
8542
|
+
}
|
|
8543
|
+
}` +
|
|
8506
8544
|
post
|
|
8507
8545
|
);
|
|
8508
8546
|
}
|
|
8509
8547
|
return (
|
|
8510
8548
|
pre +
|
|
8511
|
-
`
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8549
|
+
`{
|
|
8550
|
+
const __g_colas = g['${colas}'];
|
|
8551
|
+
const __colexp = ${colexp};
|
|
8552
|
+
const __typeof_g_colas = typeof __g_colas;
|
|
8553
|
+
const __typeof_colexp = typeof __colexp;
|
|
8554
|
+
|
|
8555
|
+
if (__typeof_g_colas === 'string' && !isNaN(__g_colas) && typeof Number(__g_colas) === 'number' &&
|
|
8556
|
+
__typeof_colexp === 'string' && !isNaN(__colexp) && typeof Number(__colexp) === 'number') {
|
|
8557
|
+
g['${colas}'] = Number(__g_colas) + Number(__colexp);
|
|
8558
|
+
} else if (__typeof_g_colas === 'string' && __typeof_colexp === 'string') {
|
|
8559
|
+
g['${colas}'] = 0;
|
|
8560
|
+
} else if (__typeof_g_colas === 'string' && __typeof_colexp === 'number') {
|
|
8561
|
+
g['${colas}'] = __colexp;
|
|
8562
|
+
} else if (__typeof_colexp === 'string' && __typeof_g_colas === 'number') {
|
|
8563
|
+
g['${colas}'] = __g_colas;
|
|
8564
|
+
} else {
|
|
8565
|
+
g['${colas}'] += __colexp || 0;
|
|
8566
|
+
}
|
|
8567
|
+
}
|
|
8568
|
+
|
|
8569
|
+
` +
|
|
8517
8570
|
post
|
|
8518
8571
|
);
|
|
8519
8572
|
} else if (col.aggregatorid === 'COUNT') {
|
|
@@ -16258,10 +16311,47 @@ alasql.from.JSON = function (filename, opts, cb, idx, query) {
|
|
|
16258
16311
|
if (cb) {
|
|
16259
16312
|
res = cb(res, idx, query);
|
|
16260
16313
|
}
|
|
16261
|
-
})
|
|
16314
|
+
}),
|
|
16315
|
+
err => {
|
|
16316
|
+
throw new Error(err);
|
|
16317
|
+
};
|
|
16262
16318
|
return res;
|
|
16263
16319
|
};
|
|
16264
16320
|
|
|
16321
|
+
const jsonl = ext => {
|
|
16322
|
+
return function (filename, opts, cb, idx, query) {
|
|
16323
|
+
let out = [];
|
|
16324
|
+
filename = alasql.utils.autoExtFilename(filename, ext, opts);
|
|
16325
|
+
alasql.utils.loadFile(
|
|
16326
|
+
filename,
|
|
16327
|
+
!!cb,
|
|
16328
|
+
function (data) {
|
|
16329
|
+
data.split(/\r?\n/).forEach((line, ix) => {
|
|
16330
|
+
const trimmed = line.trim();
|
|
16331
|
+
if (trimmed !== '') {
|
|
16332
|
+
// skip empty lines, we do not use filter on an input, as we want to preserve line numbers
|
|
16333
|
+
try {
|
|
16334
|
+
out.push(JSON.parse(trimmed));
|
|
16335
|
+
} catch (e) {
|
|
16336
|
+
throw new Error(`Could not parse JSON at line ${ix}: ${e.toString()}`);
|
|
16337
|
+
}
|
|
16338
|
+
}
|
|
16339
|
+
});
|
|
16340
|
+
if (cb) {
|
|
16341
|
+
res = cb(out, idx, query);
|
|
16342
|
+
}
|
|
16343
|
+
},
|
|
16344
|
+
err => {
|
|
16345
|
+
throw new Error(err);
|
|
16346
|
+
}
|
|
16347
|
+
);
|
|
16348
|
+
return out;
|
|
16349
|
+
};
|
|
16350
|
+
};
|
|
16351
|
+
|
|
16352
|
+
alasql.from.JSONL = jsonl('jsonl');
|
|
16353
|
+
alasql.from.NDJSON = jsonl('ndjson');
|
|
16354
|
+
|
|
16265
16355
|
alasql.from.TXT = function (filename, opts, cb, idx, query) {
|
|
16266
16356
|
var res;
|
|
16267
16357
|
filename = alasql.utils.autoExtFilename(filename, 'txt', opts);
|