alasql 4.1.9 → 4.1.11
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/build.sh +207 -0
- package/dist/alasql-worker.js +3 -217
- package/dist/alasql.fs.js +20 -91
- package/dist/alasql.js +20 -91
- package/dist/alasql.min.js +111 -69
- package/package.json +12 -16
- package/dist/alasql-worker.min.js +0 -2
package/dist/alasql.fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.1.
|
|
1
|
+
//! AlaSQL v4.1.11 build: develop-1493d57a | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.1.
|
|
4
|
+
@version 4.1.11
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2023 Andrey Gershun & Mathias Wulff
|
|
@@ -29,7 +29,6 @@ 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
31
|
*/
|
|
32
|
-
|
|
33
32
|
/* eslint-disable */
|
|
34
33
|
|
|
35
34
|
"use strict";
|
|
@@ -142,8 +141,8 @@ var alasql = function(sql, params, cb, scope) {
|
|
|
142
141
|
Current version of alasql
|
|
143
142
|
@constant {string}
|
|
144
143
|
*/
|
|
145
|
-
alasql.version = '4.1.
|
|
146
|
-
alasql.build = 'develop-
|
|
144
|
+
alasql.version = '4.1.11';
|
|
145
|
+
alasql.build = 'develop-1493d57a';
|
|
147
146
|
|
|
148
147
|
/**
|
|
149
148
|
Debug flag
|
|
@@ -155,7 +154,6 @@ alasql.debug = undefined; // Initial debug variable
|
|
|
155
154
|
var require = function(){return null}; // as alasqlparser.js is generated, we can not "remove" references to
|
|
156
155
|
var __dirname = '';
|
|
157
156
|
//*/
|
|
158
|
-
|
|
159
157
|
/* parser generated by jison 0.4.18 */
|
|
160
158
|
/*
|
|
161
159
|
Returns a Parser object of the following structure:
|
|
@@ -3140,8 +3138,7 @@ exports.main = function commonjsMain (args) {
|
|
|
3140
3138
|
if (typeof module !== 'undefined' && require.main === module) {
|
|
3141
3139
|
exports.main(process.argv.slice(1));
|
|
3142
3140
|
}
|
|
3143
|
-
}
|
|
3144
|
-
/**
|
|
3141
|
+
}/**
|
|
3145
3142
|
12prettyflag.js - prettify
|
|
3146
3143
|
@todo move this functionality to plugin
|
|
3147
3144
|
*/
|
|
@@ -4339,7 +4336,6 @@ var getXLSX = function () {
|
|
|
4339
4336
|
|
|
4340
4337
|
// set AlaSQl path
|
|
4341
4338
|
alasql.path = alasql.utils.findAlaSQLPath();
|
|
4342
|
-
|
|
4343
4339
|
/**
|
|
4344
4340
|
Strip all comments.
|
|
4345
4341
|
@function
|
|
@@ -4424,7 +4420,6 @@ alasql.utils.uncomment = function (str) {
|
|
|
4424
4420
|
|
|
4425
4421
|
return str;
|
|
4426
4422
|
};
|
|
4427
|
-
|
|
4428
4423
|
/**
|
|
4429
4424
|
Database class for Alasql.js
|
|
4430
4425
|
*/
|
|
@@ -4927,7 +4922,6 @@ alasql.promise = function (sql, params) {
|
|
|
4927
4922
|
}
|
|
4928
4923
|
return promiseAll(sql);
|
|
4929
4924
|
};
|
|
4930
|
-
|
|
4931
4925
|
/*
|
|
4932
4926
|
//
|
|
4933
4927
|
// Database class for Alasql.js
|
|
@@ -5104,7 +5098,6 @@ Transaction.prototype.executeSQL = Transaction.prototype.exec;
|
|
|
5104
5098
|
// Transaction.prototype.run = Database.prototype.exec;
|
|
5105
5099
|
|
|
5106
5100
|
alasql.Transaction = Transaction;
|
|
5107
|
-
|
|
5108
5101
|
/*
|
|
5109
5102
|
//
|
|
5110
5103
|
// Table class for Alasql.js
|
|
@@ -5162,7 +5155,6 @@ Table.prototype.indexColumns = function () {
|
|
|
5162
5155
|
self.xcolumns[col.columnid] = col;
|
|
5163
5156
|
});
|
|
5164
5157
|
};
|
|
5165
|
-
|
|
5166
5158
|
/*
|
|
5167
5159
|
//
|
|
5168
5160
|
// View class for Alasql.js
|
|
@@ -5257,7 +5249,6 @@ var yy = {
|
|
|
5257
5249
|
};
|
|
5258
5250
|
|
|
5259
5251
|
alasqlparser.yy = alasql.yy = yy;
|
|
5260
|
-
|
|
5261
5252
|
/*
|
|
5262
5253
|
//
|
|
5263
5254
|
// Statements class for Alasql.js
|
|
@@ -5287,7 +5278,6 @@ yy.Statements = class Statements {
|
|
|
5287
5278
|
};
|
|
5288
5279
|
}
|
|
5289
5280
|
};
|
|
5290
|
-
|
|
5291
5281
|
/* global alasql */
|
|
5292
5282
|
/* global yy */
|
|
5293
5283
|
/*
|
|
@@ -6430,7 +6420,6 @@ var compileSearchOrder = function (order) {
|
|
|
6430
6420
|
return new Function('a,b', s);
|
|
6431
6421
|
}
|
|
6432
6422
|
};
|
|
6433
|
-
|
|
6434
6423
|
// Main query procedure
|
|
6435
6424
|
function queryfn(query, oldscope, cb, A, B) {
|
|
6436
6425
|
var aaa = query.sources.length;
|
|
@@ -6622,6 +6611,11 @@ function queryfn3(query) {
|
|
|
6622
6611
|
if (!query.havingfn || query.havingfn(g, query.params, alasql)) {
|
|
6623
6612
|
|
|
6624
6613
|
var d = query.selectgfn(g, query.params, alasql);
|
|
6614
|
+
|
|
6615
|
+
for (const key in query.groupColumns) {
|
|
6616
|
+
if (query.groupColumns[key] !== key && d[query.groupColumns[key]])
|
|
6617
|
+
delete d[query.groupColumns[key]];
|
|
6618
|
+
}
|
|
6625
6619
|
query.data.push(d);
|
|
6626
6620
|
}
|
|
6627
6621
|
}
|
|
@@ -7041,7 +7035,6 @@ var preIndex = function (query) {
|
|
|
7041
7035
|
}
|
|
7042
7036
|
}
|
|
7043
7037
|
};
|
|
7044
|
-
|
|
7045
7038
|
//
|
|
7046
7039
|
// Join all lines over sources
|
|
7047
7040
|
//
|
|
@@ -7257,7 +7250,6 @@ function swapSources(query, h) {
|
|
|
7257
7250
|
query.sources[h] = nextsource;
|
|
7258
7251
|
query.sources[h + 1] = source;
|
|
7259
7252
|
}
|
|
7260
|
-
|
|
7261
7253
|
/*
|
|
7262
7254
|
//
|
|
7263
7255
|
// Select run-time part for Alasql.js
|
|
@@ -7814,7 +7806,6 @@ function modify(query, res) {
|
|
|
7814
7806
|
}
|
|
7815
7807
|
return res;
|
|
7816
7808
|
}
|
|
7817
|
-
|
|
7818
7809
|
/*
|
|
7819
7810
|
//
|
|
7820
7811
|
// EXISTS and other subqueries functions functions for Alasql.js
|
|
@@ -7872,7 +7863,6 @@ alasql.precompile = function (statement, databaseid, params) {
|
|
|
7872
7863
|
});
|
|
7873
7864
|
}
|
|
7874
7865
|
};
|
|
7875
|
-
|
|
7876
7866
|
/*
|
|
7877
7867
|
//
|
|
7878
7868
|
// Select compiler part for Alasql.js
|
|
@@ -8112,7 +8102,6 @@ alasql.prepareFromData = function (data, array) {
|
|
|
8112
8102
|
|
|
8113
8103
|
return res;
|
|
8114
8104
|
};
|
|
8115
|
-
|
|
8116
8105
|
/*
|
|
8117
8106
|
//
|
|
8118
8107
|
// Select compiler part for Alasql.js
|
|
@@ -8497,7 +8486,6 @@ yy.Select.prototype.compileJoins = function (query) {
|
|
|
8497
8486
|
});
|
|
8498
8487
|
|
|
8499
8488
|
};
|
|
8500
|
-
|
|
8501
8489
|
yy.Select.prototype.compileWhere = function (query) {
|
|
8502
8490
|
if (this.where) {
|
|
8503
8491
|
if (typeof this.where == 'function') {
|
|
@@ -8598,7 +8586,6 @@ function optimizeWhereJoin(query, ast) {
|
|
|
8598
8586
|
}
|
|
8599
8587
|
}
|
|
8600
8588
|
}
|
|
8601
|
-
|
|
8602
8589
|
/*
|
|
8603
8590
|
//
|
|
8604
8591
|
// Select compiler part for Alasql.js
|
|
@@ -9039,7 +9026,6 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
9039
9026
|
|
|
9040
9027
|
return new Function('p,params,alasql', 'var y;' + s);
|
|
9041
9028
|
};
|
|
9042
|
-
|
|
9043
9029
|
/*
|
|
9044
9030
|
//
|
|
9045
9031
|
// Select compiler part for Alasql.js
|
|
@@ -9086,9 +9072,10 @@ function compileSelectStar(query, aliases, joinstar) {
|
|
|
9086
9072
|
|
|
9087
9073
|
if (columns && columns.length > 0) {
|
|
9088
9074
|
columns.forEach(function (tcol) {
|
|
9075
|
+
const escapedColumnId = escapeq(tcol.columnid);
|
|
9089
9076
|
if (joinstar && alasql.options.joinstar == 'underscore') {
|
|
9090
9077
|
ss.push(
|
|
9091
|
-
"'" + alias + '_' +
|
|
9078
|
+
"'" + alias + '_' + escapedColumnId + "':p['" + alias + "']['" + escapedColumnId + "']"
|
|
9092
9079
|
);
|
|
9093
9080
|
} else if (joinstar && alasql.options.joinstar == 'json') {
|
|
9094
9081
|
// ss.push('\''+alias+'_'+tcol.columnid+'\':p[\''+alias+'\'][\''+tcol.columnid+'\']');
|
|
@@ -9096,16 +9083,16 @@ function compileSelectStar(query, aliases, joinstar) {
|
|
|
9096
9083
|
"r['" +
|
|
9097
9084
|
alias +
|
|
9098
9085
|
"']['" +
|
|
9099
|
-
|
|
9086
|
+
escapedColumnId +
|
|
9100
9087
|
"']=p['" +
|
|
9101
9088
|
alias +
|
|
9102
9089
|
"']['" +
|
|
9103
|
-
|
|
9090
|
+
escapedColumnId +
|
|
9104
9091
|
"'];";
|
|
9105
9092
|
} else {
|
|
9106
|
-
var value = "p['" + alias + "']['" +
|
|
9093
|
+
var value = "p['" + alias + "']['" + escapedColumnId + "']";
|
|
9107
9094
|
if (!columnIds[tcol.columnid]) {
|
|
9108
|
-
var key = "'" +
|
|
9095
|
+
var key = "'" + escapedColumnId + "':";
|
|
9109
9096
|
ss.push(key + value);
|
|
9110
9097
|
columnIds[tcol.columnid] = {
|
|
9111
9098
|
id: ss.length - 1,
|
|
@@ -9120,7 +9107,7 @@ function compileSelectStar(query, aliases, joinstar) {
|
|
|
9120
9107
|
}
|
|
9121
9108
|
}
|
|
9122
9109
|
|
|
9123
|
-
query.selectColumns[
|
|
9110
|
+
query.selectColumns[escapedColumnId] = true;
|
|
9124
9111
|
|
|
9125
9112
|
var coldef = {
|
|
9126
9113
|
columnid: tcol.columnid,
|
|
@@ -9555,7 +9542,6 @@ yy.Select.prototype.compileRemoveColumns = function (query) {
|
|
|
9555
9542
|
});
|
|
9556
9543
|
}
|
|
9557
9544
|
};
|
|
9558
|
-
|
|
9559
9545
|
/* global yy */
|
|
9560
9546
|
|
|
9561
9547
|
yy.Select.prototype.compileHaving = function (query) {
|
|
@@ -9570,7 +9556,6 @@ yy.Select.prototype.compileHaving = function (query) {
|
|
|
9570
9556
|
return true;
|
|
9571
9557
|
};
|
|
9572
9558
|
};
|
|
9573
|
-
|
|
9574
9559
|
yy.Select.prototype.compileOrder = function (query, params) {
|
|
9575
9560
|
var self = this;
|
|
9576
9561
|
self.orderColumns = [];
|
|
@@ -9726,7 +9711,6 @@ if(false) {
|
|
|
9726
9711
|
return new Function('a,b', 'var y;' + s);
|
|
9727
9712
|
}
|
|
9728
9713
|
};
|
|
9729
|
-
|
|
9730
9714
|
// Pivot functions
|
|
9731
9715
|
/**
|
|
9732
9716
|
Compile Pivot functions
|
|
@@ -9916,7 +9900,6 @@ yy.Select.prototype.compileUnpivot = function (query) {
|
|
|
9916
9900
|
// });
|
|
9917
9901
|
};
|
|
9918
9902
|
};
|
|
9919
|
-
|
|
9920
9903
|
/*
|
|
9921
9904
|
//
|
|
9922
9905
|
// ROLLUP(), CUBE(), GROUPING SETS() for Alasql.js
|
|
@@ -10072,7 +10055,6 @@ function decartes(gv, query) {
|
|
|
10072
10055
|
}
|
|
10073
10056
|
|
|
10074
10057
|
}
|
|
10075
|
-
|
|
10076
10058
|
/*
|
|
10077
10059
|
//
|
|
10078
10060
|
// Select run-time part for Alasql.js
|
|
@@ -10153,7 +10135,6 @@ yy.Select.prototype.compileDefCols = function (query, databaseid) {
|
|
|
10153
10135
|
|
|
10154
10136
|
return defcols;
|
|
10155
10137
|
};
|
|
10156
|
-
|
|
10157
10138
|
/*
|
|
10158
10139
|
//
|
|
10159
10140
|
// UNION for Alasql.js
|
|
@@ -10177,7 +10158,6 @@ yy.Union = class Union {
|
|
|
10177
10158
|
return null;
|
|
10178
10159
|
}
|
|
10179
10160
|
};
|
|
10180
|
-
|
|
10181
10161
|
/*
|
|
10182
10162
|
//
|
|
10183
10163
|
// CROSS AND OUTER APPLY for Alasql.js
|
|
@@ -10199,7 +10179,6 @@ yy.Apply = class Apply {
|
|
|
10199
10179
|
return s;
|
|
10200
10180
|
}
|
|
10201
10181
|
};
|
|
10202
|
-
|
|
10203
10182
|
/*
|
|
10204
10183
|
//
|
|
10205
10184
|
// CROSS AND OUTER APPLY for Alasql.js
|
|
@@ -10226,7 +10205,6 @@ yy.Over = class Over {
|
|
|
10226
10205
|
return s;
|
|
10227
10206
|
}
|
|
10228
10207
|
};
|
|
10229
|
-
|
|
10230
10208
|
/*
|
|
10231
10209
|
//
|
|
10232
10210
|
// Expressions for Alasql.js
|
|
@@ -10596,7 +10574,7 @@ yy.Over = class Over {
|
|
|
10596
10574
|
var ljs = '(' + leftJS() + '||{})';
|
|
10597
10575
|
|
|
10598
10576
|
if (typeof this.right === 'string') {
|
|
10599
|
-
s = ljs + '["' + this.right + '"]';
|
|
10577
|
+
s = ljs + '["' + escapeq(this.right) + '"]';
|
|
10600
10578
|
} else if (typeof this.right === 'number') {
|
|
10601
10579
|
s = ljs + '[' + this.right + ']';
|
|
10602
10580
|
} else if (this.right instanceof yy.FuncValue) {
|
|
@@ -10835,7 +10813,7 @@ yy.Over = class Over {
|
|
|
10835
10813
|
}
|
|
10836
10814
|
|
|
10837
10815
|
toJS() {
|
|
10838
|
-
return "alasql.vars['" + this.variable + "']";
|
|
10816
|
+
return "alasql.vars['" + escapeq(this.variable) + "']";
|
|
10839
10817
|
}
|
|
10840
10818
|
}
|
|
10841
10819
|
|
|
@@ -11224,7 +11202,7 @@ yy.Over = class Over {
|
|
|
11224
11202
|
toJS() {
|
|
11225
11203
|
var colas = this.nick;
|
|
11226
11204
|
if (colas === undefined) {
|
|
11227
|
-
colas = this.toString();
|
|
11205
|
+
colas = escapeq(this.toString());
|
|
11228
11206
|
}
|
|
11229
11207
|
return "g['" + colas + "']";
|
|
11230
11208
|
}
|
|
@@ -11272,7 +11250,6 @@ yy.Over = class Over {
|
|
|
11272
11250
|
View,
|
|
11273
11251
|
});
|
|
11274
11252
|
}
|
|
11275
|
-
|
|
11276
11253
|
// Alasql Linq library
|
|
11277
11254
|
|
|
11278
11255
|
yy.FromData = function (params) {
|
|
@@ -11438,7 +11415,6 @@ yy.Select.prototype.Where = function (expr) {
|
|
|
11438
11415
|
}
|
|
11439
11416
|
return self;
|
|
11440
11417
|
};
|
|
11441
|
-
|
|
11442
11418
|
/*
|
|
11443
11419
|
//
|
|
11444
11420
|
// Functions for Alasql.js
|
|
@@ -11900,7 +11876,6 @@ stdfn.NEWID =
|
|
|
11900
11876
|
lut[(d3 >> 24) & 0xff]
|
|
11901
11877
|
);
|
|
11902
11878
|
};
|
|
11903
|
-
|
|
11904
11879
|
/*
|
|
11905
11880
|
//
|
|
11906
11881
|
// CASE for Alasql.js
|
|
@@ -11974,7 +11949,6 @@ yy.CaseValue.prototype.toJS = function (context, tableid, defcols) {
|
|
|
11974
11949
|
|
|
11975
11950
|
return s;
|
|
11976
11951
|
};
|
|
11977
|
-
|
|
11978
11952
|
/*
|
|
11979
11953
|
//
|
|
11980
11954
|
// JSON for Alasql.js
|
|
@@ -12083,7 +12057,6 @@ yy.Json.prototype.toJS = function (context, tableid, defcols) {
|
|
|
12083
12057
|
// TODO redo
|
|
12084
12058
|
return JSONtoJS(this.value, context, tableid, defcols);
|
|
12085
12059
|
};
|
|
12086
|
-
|
|
12087
12060
|
/*
|
|
12088
12061
|
//
|
|
12089
12062
|
// CAST and CONVERT functions
|
|
@@ -12298,7 +12271,6 @@ alasql.stdfn.CONVERT = function (value, args) {
|
|
|
12298
12271
|
}
|
|
12299
12272
|
return val;
|
|
12300
12273
|
};
|
|
12301
|
-
|
|
12302
12274
|
/*
|
|
12303
12275
|
//
|
|
12304
12276
|
// CREATE TABLE for Alasql.js
|
|
@@ -12974,7 +12946,6 @@ yy.CreateTable.prototype.execute = function (databaseid, params, cb) {
|
|
|
12974
12946
|
if (cb) res = cb(res);
|
|
12975
12947
|
return res;
|
|
12976
12948
|
};
|
|
12977
|
-
|
|
12978
12949
|
//
|
|
12979
12950
|
// Date functions
|
|
12980
12951
|
//
|
|
@@ -13146,7 +13117,6 @@ function newDate(d) {
|
|
|
13146
13117
|
}
|
|
13147
13118
|
return new Date(d);
|
|
13148
13119
|
}
|
|
13149
|
-
|
|
13150
13120
|
/*
|
|
13151
13121
|
//
|
|
13152
13122
|
// DROP TABLE for Alasql.js
|
|
@@ -13257,7 +13227,6 @@ yy.TruncateTable.prototype.execute = function (databaseid, params, cb) {
|
|
|
13257
13227
|
}
|
|
13258
13228
|
return cb ? cb(0) : 0;
|
|
13259
13229
|
};
|
|
13260
|
-
|
|
13261
13230
|
/*
|
|
13262
13231
|
//
|
|
13263
13232
|
// CREATE VERTEX for AlaSQL
|
|
@@ -13696,7 +13665,6 @@ yy.CreateGraph.prototype.compile1 = function (databaseid) {
|
|
|
13696
13665
|
};
|
|
13697
13666
|
return statement;
|
|
13698
13667
|
};
|
|
13699
|
-
|
|
13700
13668
|
/*
|
|
13701
13669
|
//
|
|
13702
13670
|
// ALTER TABLE for Alasql.js
|
|
@@ -13859,7 +13827,6 @@ yy.AlterTable.prototype.execute = function (databaseid, params, cb) {
|
|
|
13859
13827
|
throw Error('Unknown ALTER TABLE method');
|
|
13860
13828
|
}
|
|
13861
13829
|
};
|
|
13862
|
-
|
|
13863
13830
|
/*
|
|
13864
13831
|
//
|
|
13865
13832
|
// CREATE TABLE for Alasql.js
|
|
@@ -13952,7 +13919,6 @@ yy.Reindex.prototype.execute = function (databaseid, params, cb) {
|
|
|
13952
13919
|
if (cb) res = cb(res);
|
|
13953
13920
|
return res;
|
|
13954
13921
|
};
|
|
13955
|
-
|
|
13956
13922
|
/*
|
|
13957
13923
|
//
|
|
13958
13924
|
// DROP TABLE for Alasql.js
|
|
@@ -13975,7 +13941,6 @@ yy.DropIndex.prototype.compile = function (db) {
|
|
|
13975
13941
|
return 1;
|
|
13976
13942
|
};
|
|
13977
13943
|
};
|
|
13978
|
-
|
|
13979
13944
|
/*
|
|
13980
13945
|
//
|
|
13981
13946
|
// WITH SELECT for Alasql.js
|
|
@@ -14066,7 +14031,6 @@ yy.If.prototype.execute = function (databaseid, params, cb) {
|
|
|
14066
14031
|
// else res = this.elsestat.execute(databaseid,params,cb,scope);
|
|
14067
14032
|
return res;
|
|
14068
14033
|
};
|
|
14069
|
-
|
|
14070
14034
|
/*
|
|
14071
14035
|
//
|
|
14072
14036
|
// CREATE VIEW for Alasql.js
|
|
@@ -14169,7 +14133,6 @@ yy.BeginEnd.prototype.execute = function (databaseid, params, cb, scope) {
|
|
|
14169
14133
|
}
|
|
14170
14134
|
return res;
|
|
14171
14135
|
};
|
|
14172
|
-
|
|
14173
14136
|
/*
|
|
14174
14137
|
//
|
|
14175
14138
|
// INSERT for Alasql.js
|
|
@@ -14442,7 +14405,6 @@ yy.Insert.prototype.execute = function (databaseid, params, cb) {
|
|
|
14442
14405
|
return this.compile(databaseid)(params, cb);
|
|
14443
14406
|
// throw new Error('Insert statement is should be compiled')
|
|
14444
14407
|
};
|
|
14445
|
-
|
|
14446
14408
|
/*
|
|
14447
14409
|
//
|
|
14448
14410
|
// TRIGGER for Alasql.js
|
|
@@ -14553,7 +14515,6 @@ yy.DropTrigger.prototype.execute = function (databaseid, params, cb) {
|
|
|
14553
14515
|
if (cb) res = cb(res);
|
|
14554
14516
|
return res;
|
|
14555
14517
|
};
|
|
14556
|
-
|
|
14557
14518
|
/*
|
|
14558
14519
|
//
|
|
14559
14520
|
// DELETE for Alasql.js
|
|
@@ -14710,7 +14671,6 @@ yy.Delete.prototype.compile = function (databaseid) {
|
|
|
14710
14671
|
yy.Delete.prototype.execute = function (databaseid, params, cb) {
|
|
14711
14672
|
return this.compile(databaseid)(params, cb);
|
|
14712
14673
|
};
|
|
14713
|
-
|
|
14714
14674
|
/*
|
|
14715
14675
|
//
|
|
14716
14676
|
// UPDATE for Alasql.js
|
|
@@ -14822,7 +14782,6 @@ yy.Update.prototype.compile = function (databaseid) {
|
|
|
14822
14782
|
yy.Update.prototype.execute = function (databaseid, params, cb) {
|
|
14823
14783
|
return this.compile(databaseid)(params, cb);
|
|
14824
14784
|
};
|
|
14825
|
-
|
|
14826
14785
|
/*
|
|
14827
14786
|
//
|
|
14828
14787
|
// SET for Alasql.js
|
|
@@ -14878,7 +14837,6 @@ yy.Merge.prototype.execute = function (databaseid, params, cb) {
|
|
|
14878
14837
|
if (cb) res = cb(res);
|
|
14879
14838
|
return res;
|
|
14880
14839
|
};
|
|
14881
|
-
|
|
14882
14840
|
/*
|
|
14883
14841
|
//
|
|
14884
14842
|
// UPDATE for Alasql.js
|
|
@@ -15103,7 +15061,6 @@ yy.DropDatabase.prototype.execute = function (databaseid, params, cb) {
|
|
|
15103
15061
|
if (cb) cb(res);
|
|
15104
15062
|
return res;
|
|
15105
15063
|
};
|
|
15106
|
-
|
|
15107
15064
|
/*
|
|
15108
15065
|
//
|
|
15109
15066
|
// SET for Alasql.js
|
|
@@ -15176,7 +15133,6 @@ yy.Declare.prototype.execute = function (databaseid, params, cb) {
|
|
|
15176
15133
|
}
|
|
15177
15134
|
return res;
|
|
15178
15135
|
};
|
|
15179
|
-
|
|
15180
15136
|
/*
|
|
15181
15137
|
//
|
|
15182
15138
|
// SHOW for Alasql.js
|
|
@@ -15323,7 +15279,6 @@ yy.ShowCreateTable.prototype.execute = function (databaseid) {
|
|
|
15323
15279
|
throw new Error('There is no such table "' + this.table.tableid + '"');
|
|
15324
15280
|
}
|
|
15325
15281
|
};
|
|
15326
|
-
|
|
15327
15282
|
/*
|
|
15328
15283
|
//
|
|
15329
15284
|
// SET for Alasql.js
|
|
@@ -15415,7 +15370,6 @@ yy.SetVariable.prototype.execute = function (databaseid, params, cb) {
|
|
|
15415
15370
|
if (cb) res = cb(res);
|
|
15416
15371
|
return res;
|
|
15417
15372
|
};
|
|
15418
|
-
|
|
15419
15373
|
alasql.test = function (name, times, fn) {
|
|
15420
15374
|
if (arguments.length === 0) {
|
|
15421
15375
|
alasql.log(alasql.con.results);
|
|
@@ -15715,7 +15669,6 @@ alasql.prompt = function (el, useidel, firstsql) {
|
|
|
15715
15669
|
}
|
|
15716
15670
|
};
|
|
15717
15671
|
};
|
|
15718
|
-
|
|
15719
15672
|
/*
|
|
15720
15673
|
//
|
|
15721
15674
|
// Commit for Alasql.js
|
|
@@ -15776,7 +15729,6 @@ yy.RollbackTransaction.prototype.execute = function (databaseid, params, cb) {
|
|
|
15776
15729
|
if (cb) cb(res);
|
|
15777
15730
|
return res;
|
|
15778
15731
|
};
|
|
15779
|
-
|
|
15780
15732
|
if (alasql.options.tsql) {
|
|
15781
15733
|
//
|
|
15782
15734
|
// Check tables and views
|
|
@@ -15812,7 +15764,6 @@ if (alasql.options.tsql) {
|
|
|
15812
15764
|
return undefined;
|
|
15813
15765
|
};
|
|
15814
15766
|
}
|
|
15815
|
-
|
|
15816
15767
|
if (alasql.options.mysql) {
|
|
15817
15768
|
alasql.fn.TIMESTAMPDIFF = function (unit, date1, date2) {
|
|
15818
15769
|
return alasql.stdfn.DATEDIFF(unit, date1, date2);
|
|
@@ -15841,16 +15792,12 @@ if (alasql.options.mysql || alasql.options.sqlite) {
|
|
|
15841
15792
|
throw new Error('Unknown INFORMATION_SCHEMA table');
|
|
15842
15793
|
};
|
|
15843
15794
|
}
|
|
15844
|
-
|
|
15845
15795
|
if (alasql.options.postgres) {
|
|
15846
15796
|
}
|
|
15847
|
-
|
|
15848
15797
|
if (alasql.options.oracle) {
|
|
15849
15798
|
}
|
|
15850
|
-
|
|
15851
15799
|
if (alasql.options.sqlite) {
|
|
15852
15800
|
}
|
|
15853
|
-
|
|
15854
15801
|
//
|
|
15855
15802
|
// into functions
|
|
15856
15803
|
//
|
|
@@ -16107,7 +16054,6 @@ alasql.into.CSV = function (filename, opts, data, columns, cb) {
|
|
|
16107
16054
|
}
|
|
16108
16055
|
return res;
|
|
16109
16056
|
};
|
|
16110
|
-
|
|
16111
16057
|
//
|
|
16112
16058
|
// 831xl.js - Coloring Excel
|
|
16113
16059
|
// 18.04.2015
|
|
@@ -16432,7 +16378,6 @@ alasql.into.XLS = function (filename, opts, data, columns, cb) {
|
|
|
16432
16378
|
return s;
|
|
16433
16379
|
}
|
|
16434
16380
|
};
|
|
16435
|
-
|
|
16436
16381
|
alasql.into.XLSXML = function (filename, opts, data, columns, cb) {
|
|
16437
16382
|
opts = opts || {};
|
|
16438
16383
|
|
|
@@ -16786,7 +16731,6 @@ alasql.into.XLSXML = function (filename, opts, data, columns, cb) {
|
|
|
16786
16731
|
return s1 + s2 + s3;
|
|
16787
16732
|
}
|
|
16788
16733
|
};
|
|
16789
|
-
|
|
16790
16734
|
/**
|
|
16791
16735
|
Export to XLSX function
|
|
16792
16736
|
@function
|
|
@@ -16978,7 +16922,6 @@ alasql.into.XLSX = function (filename, opts, data, columns, cb) {
|
|
|
16978
16922
|
|
|
16979
16923
|
}
|
|
16980
16924
|
};
|
|
16981
|
-
|
|
16982
16925
|
/*
|
|
16983
16926
|
//
|
|
16984
16927
|
// FROM functions Alasql.js
|
|
@@ -17462,7 +17405,6 @@ alasql.from.ODS = function (filename, opts, cb, idx, query) {
|
|
|
17462
17405
|
opts.autoExt = false;
|
|
17463
17406
|
return XLSXLSX(getXLSX(), filename, opts, cb, idx, query);
|
|
17464
17407
|
};
|
|
17465
|
-
|
|
17466
17408
|
alasql.from.XML = function (filename, opts, cb, idx, query) {
|
|
17467
17409
|
var res;
|
|
17468
17410
|
|
|
@@ -17628,7 +17570,6 @@ function xmlparse(xml) {
|
|
|
17628
17570
|
return 0 == xml.indexOf(prefix);
|
|
17629
17571
|
}
|
|
17630
17572
|
}
|
|
17631
|
-
|
|
17632
17573
|
alasql.from.GEXF = function (filename, opts, cb, idx, query) {
|
|
17633
17574
|
var res;
|
|
17634
17575
|
alasql('SEARCH FROM XML(' + filename + ')', [], function (data) {
|
|
@@ -17638,7 +17579,6 @@ alasql.from.GEXF = function (filename, opts, cb, idx, query) {
|
|
|
17638
17579
|
});
|
|
17639
17580
|
return res;
|
|
17640
17581
|
};
|
|
17641
|
-
|
|
17642
17582
|
/*
|
|
17643
17583
|
//
|
|
17644
17584
|
// HELP for Alasql.js
|
|
@@ -17706,7 +17646,6 @@ yy.Print.prototype.execute = function (databaseid, params, cb) {
|
|
|
17706
17646
|
if (cb) res = cb(res);
|
|
17707
17647
|
return res;
|
|
17708
17648
|
};
|
|
17709
|
-
|
|
17710
17649
|
/*
|
|
17711
17650
|
//
|
|
17712
17651
|
// HELP for Alasql.js
|
|
@@ -17744,7 +17683,6 @@ yy.Source.prototype.execute = function (databaseid, params, cb) {
|
|
|
17744
17683
|
);
|
|
17745
17684
|
return res;
|
|
17746
17685
|
};
|
|
17747
|
-
|
|
17748
17686
|
/*
|
|
17749
17687
|
//
|
|
17750
17688
|
// HELP for Alasql.js
|
|
@@ -17818,7 +17756,6 @@ yy.Require.prototype.execute = function (databaseid, params, cb) {
|
|
|
17818
17756
|
}
|
|
17819
17757
|
return res;
|
|
17820
17758
|
};
|
|
17821
|
-
|
|
17822
17759
|
/*
|
|
17823
17760
|
//
|
|
17824
17761
|
// HELP for Alasql.js
|
|
@@ -17854,7 +17791,6 @@ yy.Assert.prototype.execute = function (databaseid) {
|
|
|
17854
17791
|
}
|
|
17855
17792
|
return 1;
|
|
17856
17793
|
};
|
|
17857
|
-
|
|
17858
17794
|
//
|
|
17859
17795
|
// 91indexeddb.js
|
|
17860
17796
|
// AlaSQL IndexedDB module
|
|
@@ -18215,7 +18151,6 @@ IDB.updateTable = function (databaseid, tableid, assignfn, wherefn, params, cb)
|
|
|
18215
18151
|
};
|
|
18216
18152
|
};
|
|
18217
18153
|
};
|
|
18218
|
-
|
|
18219
18154
|
//
|
|
18220
18155
|
// 91localstorage.js
|
|
18221
18156
|
// localStorage and DOM-Storage engine
|
|
@@ -18669,7 +18604,6 @@ LS.rollback = function (databaseid, cb) {
|
|
|
18669
18604
|
// }
|
|
18670
18605
|
|
|
18671
18606
|
};
|
|
18672
|
-
|
|
18673
18607
|
//
|
|
18674
18608
|
// 93sqlite.js
|
|
18675
18609
|
// SQLite database support
|
|
@@ -18780,7 +18714,6 @@ SQLITE.intoTable = function (databaseid, tableid, value, columns, cb) {
|
|
|
18780
18714
|
if (cb) cb(res);
|
|
18781
18715
|
return res;
|
|
18782
18716
|
};
|
|
18783
|
-
|
|
18784
18717
|
//
|
|
18785
18718
|
// 91localstorage.js
|
|
18786
18719
|
// localStorage and DOM-Storage engine
|
|
@@ -19032,9 +18965,7 @@ FS.rollback = function (databaseid, cb) {
|
|
|
19032
18965
|
// if(!alasql.options.autocommit) {
|
|
19033
18966
|
|
|
19034
18967
|
};
|
|
19035
|
-
|
|
19036
18968
|
if(utils.isBrowser && !utils.isWebWorker) {
|
|
19037
|
-
|
|
19038
18969
|
alasql = alasql || false;
|
|
19039
18970
|
|
|
19040
18971
|
if (!alasql) {
|
|
@@ -19111,7 +19042,6 @@ if (typeof Worker !== 'undefined') {
|
|
|
19111
19042
|
}
|
|
19112
19043
|
};
|
|
19113
19044
|
}
|
|
19114
|
-
|
|
19115
19045
|
/* FileSaver.js
|
|
19116
19046
|
* A saveAs() FileSaver implementation.
|
|
19117
19047
|
* 1.3.2
|
|
@@ -19311,7 +19241,6 @@ if (typeof module !== 'undefined' && module.exports) {
|
|
|
19311
19241
|
return saveAs;
|
|
19312
19242
|
});
|
|
19313
19243
|
}
|
|
19314
|
-
|
|
19315
19244
|
/* eslint-disable */
|
|
19316
19245
|
|
|
19317
19246
|
/*
|