alasql 4.1.5 → 4.1.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/dist/alasql-worker.js +2 -2
- package/dist/alasql-worker.min.js +1 -1
- package/dist/alasql.fs.js +246 -237
- package/dist/alasql.js +246 -237
- package/dist/alasql.min.js +31 -25
- package/package.json +1 -1
package/dist/alasql.fs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//! AlaSQL v4.1.
|
|
1
|
+
//! AlaSQL v4.1.5 build: develop-794022fb | © 2014-2023 Andrey Gershun & Mathias Wulff | License: MIT
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 4.1.
|
|
4
|
+
@version 4.1.5
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
© 2014-2023 Andrey Gershun & Mathias Wulff
|
|
@@ -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 = '4.1.
|
|
146
|
-
alasql.build = 'develop-
|
|
145
|
+
alasql.version = '4.1.5';
|
|
146
|
+
alasql.build = 'develop-794022fb';
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
Debug flag
|
|
@@ -241,8 +241,8 @@ var $0 = $$.length - 1;
|
|
|
241
241
|
switch (yystate) {
|
|
242
242
|
case 1:
|
|
243
243
|
|
|
244
|
-
if (alasql.options.casesensitive) this.$ = $$[$0];
|
|
245
|
-
else this.$ = $$[$0].toLowerCase();
|
|
244
|
+
if (alasql.options.casesensitive) this.$ = $$[$0];
|
|
245
|
+
else this.$ = $$[$0].toLowerCase();
|
|
246
246
|
|
|
247
247
|
break;
|
|
248
248
|
case 2:
|
|
@@ -274,13 +274,13 @@ case 11:
|
|
|
274
274
|
break;
|
|
275
275
|
case 12:
|
|
276
276
|
|
|
277
|
-
this.$ = $$[$0];
|
|
277
|
+
this.$ = $$[$0];
|
|
278
278
|
|
|
279
|
-
// TODO combine exists and queries
|
|
280
|
-
if(yy.exists) this.$.exists = yy.exists;
|
|
281
|
-
delete yy.exists;
|
|
282
|
-
if(yy.queries) this.$.queries = yy.queries;
|
|
283
|
-
delete yy.queries;
|
|
279
|
+
// TODO combine exists and queries
|
|
280
|
+
if(yy.exists) this.$.exists = yy.exists;
|
|
281
|
+
delete yy.exists;
|
|
282
|
+
if(yy.queries) this.$.queries = yy.queries;
|
|
283
|
+
delete yy.queries;
|
|
284
284
|
|
|
285
285
|
break;
|
|
286
286
|
case 13: case 162: case 172: case 237: case 238: case 240: case 248: case 250: case 259: case 270: case 273: case 380: case 496: case 506: case 508: case 520: case 526: case 527: case 572:
|
|
@@ -297,20 +297,20 @@ case 71:
|
|
|
297
297
|
break;
|
|
298
298
|
case 72:
|
|
299
299
|
|
|
300
|
-
yy.extend(this.$,$$[$0-9]); yy.extend(this.$,$$[$0-8]); yy.extend(this.$,$$[$0-7]); yy.extend(this.$,$$[$0-6]);
|
|
301
|
-
yy.extend(this.$,$$[$0-5]); yy.extend(this.$,$$[$0-4]);yy.extend(this.$,$$[$0-3]);
|
|
302
|
-
yy.extend(this.$,$$[$0-2]); yy.extend(this.$,$$[$0-1]); yy.extend(this.$,$$[$0]);
|
|
303
|
-
this.$ = $$[$0-9];
|
|
304
|
-
/* if(yy.exists) this.$.exists = yy.exists;
|
|
305
|
-
delete yy.exists;
|
|
306
|
-
if(yy.queries) this.$.queries = yy.queries;
|
|
307
|
-
delete yy.queries;
|
|
300
|
+
yy.extend(this.$,$$[$0-9]); yy.extend(this.$,$$[$0-8]); yy.extend(this.$,$$[$0-7]); yy.extend(this.$,$$[$0-6]);
|
|
301
|
+
yy.extend(this.$,$$[$0-5]); yy.extend(this.$,$$[$0-4]);yy.extend(this.$,$$[$0-3]);
|
|
302
|
+
yy.extend(this.$,$$[$0-2]); yy.extend(this.$,$$[$0-1]); yy.extend(this.$,$$[$0]);
|
|
303
|
+
this.$ = $$[$0-9];
|
|
304
|
+
/* if(yy.exists) this.$.exists = yy.exists;
|
|
305
|
+
delete yy.exists;
|
|
306
|
+
if(yy.queries) this.$.queries = yy.queries;
|
|
307
|
+
delete yy.queries;
|
|
308
308
|
*/
|
|
309
309
|
break;
|
|
310
310
|
case 73:
|
|
311
311
|
|
|
312
|
-
this.$ = new yy.Search({selectors:$$[$0-2], from:$$[$0]});
|
|
313
|
-
yy.extend(this.$,$$[$0-1]);
|
|
312
|
+
this.$ = new yy.Search({selectors:$$[$0-2], from:$$[$0]});
|
|
313
|
+
yy.extend(this.$,$$[$0-1]);
|
|
314
314
|
|
|
315
315
|
break;
|
|
316
316
|
case 74:
|
|
@@ -348,9 +348,9 @@ case 91:
|
|
|
348
348
|
break;
|
|
349
349
|
case 92:
|
|
350
350
|
|
|
351
|
-
var dir = $$[$0-1];
|
|
352
|
-
if(!dir) dir = 'ASC';
|
|
353
|
-
this.$ = {srchid:"ORDERBY", args: [{expression: new yy.Column({columnid:'_'}), direction:dir}]};
|
|
351
|
+
var dir = $$[$0-1];
|
|
352
|
+
if(!dir) dir = 'ASC';
|
|
353
|
+
this.$ = {srchid:"ORDERBY", args: [{expression: new yy.Column({columnid:'_'}), direction:dir}]};
|
|
354
354
|
|
|
355
355
|
break;
|
|
356
356
|
case 93:
|
|
@@ -517,11 +517,11 @@ case 150:
|
|
|
517
517
|
break;
|
|
518
518
|
case 151:
|
|
519
519
|
|
|
520
|
-
if(!$$[$0]) {
|
|
521
|
-
this.$ = new yy.Select({columns:[new yy.Column({columnid:'_',})], modifier:'COLUMN'});
|
|
522
|
-
} else {
|
|
523
|
-
this.$ = new yy.Select({ columns:$$[$0] }); yy.extend(this.$, $$[$0-2]);yy.extend(this.$, $$[$0-1]);
|
|
524
|
-
}
|
|
520
|
+
if(!$$[$0]) {
|
|
521
|
+
this.$ = new yy.Select({columns:[new yy.Column({columnid:'_',})], modifier:'COLUMN'});
|
|
522
|
+
} else {
|
|
523
|
+
this.$ = new yy.Select({ columns:$$[$0] }); yy.extend(this.$, $$[$0-2]);yy.extend(this.$, $$[$0-1]);
|
|
524
|
+
}
|
|
525
525
|
|
|
526
526
|
break;
|
|
527
527
|
case 152:
|
|
@@ -562,17 +562,17 @@ this.$ = {into: $$[$0]}
|
|
|
562
562
|
break;
|
|
563
563
|
case 168:
|
|
564
564
|
|
|
565
|
-
var s = $$[$0];
|
|
566
|
-
s = s.substr(1,s.length-2);
|
|
567
|
-
var x3 = s.substr(-3).toUpperCase();
|
|
568
|
-
var x4 = s.substr(-4).toUpperCase();
|
|
569
|
-
if(s[0] == '#') {
|
|
570
|
-
this.$ = {into: new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
|
|
571
|
-
} else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
|
|
572
|
-
this.$ = {into: new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
|
|
573
|
-
} else if(x4=='XLSX' || x4 == 'JSON') {
|
|
574
|
-
this.$ = {into: new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
|
|
575
|
-
}
|
|
565
|
+
var s = $$[$0];
|
|
566
|
+
s = s.substr(1,s.length-2);
|
|
567
|
+
var x3 = s.substr(-3).toUpperCase();
|
|
568
|
+
var x4 = s.substr(-4).toUpperCase();
|
|
569
|
+
if(s[0] == '#') {
|
|
570
|
+
this.$ = {into: new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
|
|
571
|
+
} else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
|
|
572
|
+
this.$ = {into: new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
|
|
573
|
+
} else if(x4=='XLSX' || x4 == 'JSON') {
|
|
574
|
+
this.$ = {into: new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
|
|
575
|
+
}
|
|
576
576
|
|
|
577
577
|
break;
|
|
578
578
|
case 169:
|
|
@@ -634,30 +634,30 @@ case 193:
|
|
|
634
634
|
break;
|
|
635
635
|
case 200:
|
|
636
636
|
|
|
637
|
-
var s = $$[$0];
|
|
638
|
-
s = s.substr(1,s.length-2);
|
|
639
|
-
var x3 = s.substr(-3).toUpperCase();
|
|
640
|
-
var x4 = s.substr(-4).toUpperCase();
|
|
641
|
-
var r;
|
|
642
|
-
if(s[0] == '#') {
|
|
643
|
-
r = new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
|
|
644
|
-
} else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
|
|
645
|
-
r = new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
|
|
646
|
-
} else if(x4=='XLSX' || x4 == 'JSON') {
|
|
647
|
-
r = new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
|
|
648
|
-
} else {
|
|
649
|
-
throw new Error('Unknown string in FROM clause');
|
|
650
|
-
};
|
|
651
|
-
this.$ = r;
|
|
637
|
+
var s = $$[$0];
|
|
638
|
+
s = s.substr(1,s.length-2);
|
|
639
|
+
var x3 = s.substr(-3).toUpperCase();
|
|
640
|
+
var x4 = s.substr(-4).toUpperCase();
|
|
641
|
+
var r;
|
|
642
|
+
if(s[0] == '#') {
|
|
643
|
+
r = new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
|
|
644
|
+
} else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
|
|
645
|
+
r = new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
|
|
646
|
+
} else if(x4=='XLSX' || x4 == 'JSON') {
|
|
647
|
+
r = new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
|
|
648
|
+
} else {
|
|
649
|
+
throw new Error('Unknown string in FROM clause');
|
|
650
|
+
};
|
|
651
|
+
this.$ = r;
|
|
652
652
|
|
|
653
653
|
break;
|
|
654
654
|
case 201:
|
|
655
655
|
|
|
656
|
-
if($$[$0-2] == 'INFORMATION_SCHEMA') {
|
|
657
|
-
this.$ = new yy.FuncValue({funcid: $$[$0-2], args:[new yy.StringValue({value:$$[$0]})]});
|
|
658
|
-
} else {
|
|
659
|
-
this.$ = new yy.Table({databaseid: $$[$0-2], tableid:$$[$0]});
|
|
660
|
-
}
|
|
656
|
+
if($$[$0-2] == 'INFORMATION_SCHEMA') {
|
|
657
|
+
this.$ = new yy.FuncValue({funcid: $$[$0-2], args:[new yy.StringValue({value:$$[$0]})]});
|
|
658
|
+
} else {
|
|
659
|
+
this.$ = new yy.Table({databaseid: $$[$0-2], tableid:$$[$0]});
|
|
660
|
+
}
|
|
661
661
|
|
|
662
662
|
break;
|
|
663
663
|
case 202:
|
|
@@ -857,10 +857,10 @@ case 306:
|
|
|
857
857
|
break;
|
|
858
858
|
case 309: case 310: case 311:
|
|
859
859
|
|
|
860
|
-
if(!yy.queries) yy.queries = [];
|
|
861
|
-
yy.queries.push($$[$0-1]);
|
|
862
|
-
$$[$0-1].queriesidx = yy.queries.length;
|
|
863
|
-
this.$ = $$[$0-1];
|
|
860
|
+
if(!yy.queries) yy.queries = [];
|
|
861
|
+
yy.queries.push($$[$0-1]);
|
|
862
|
+
$$[$0-1].queriesidx = yy.queries.length;
|
|
863
|
+
this.$ = $$[$0-1];
|
|
864
864
|
|
|
865
865
|
break;
|
|
866
866
|
case 312:
|
|
@@ -901,18 +901,18 @@ case 329:
|
|
|
901
901
|
break;
|
|
902
902
|
case 330:
|
|
903
903
|
|
|
904
|
-
if($$[$0-2].length > 1 && ($$[$0-4].toUpperCase() == 'MAX' || $$[$0-4].toUpperCase() == 'MIN')) {
|
|
905
|
-
this.$ = new yy.FuncValue({funcid:$$[$0-4],args:$$[$0-2]});
|
|
906
|
-
} else {
|
|
907
|
-
this.$ = new yy.AggrValue({aggregatorid: $$[$0-4].toUpperCase(), expression: $$[$0-2].pop(), over:$$[$0]});
|
|
908
|
-
}
|
|
904
|
+
if($$[$0-2].length > 1 && ($$[$0-4].toUpperCase() == 'MAX' || $$[$0-4].toUpperCase() == 'MIN')) {
|
|
905
|
+
this.$ = new yy.FuncValue({funcid:$$[$0-4],args:$$[$0-2]});
|
|
906
|
+
} else {
|
|
907
|
+
this.$ = new yy.AggrValue({aggregatorid: $$[$0-4].toUpperCase(), expression: $$[$0-2].pop(), over:$$[$0]});
|
|
908
|
+
}
|
|
909
909
|
|
|
910
910
|
break;
|
|
911
911
|
case 331:
|
|
912
912
|
this.$ = new yy.AggrValue({aggregatorid: $$[$0-5].toUpperCase(), expression: $$[$0-2], distinct:true, over:$$[$0]});
|
|
913
913
|
break;
|
|
914
914
|
case 332:
|
|
915
|
-
this.$ = new yy.AggrValue({aggregatorid: $$[$0-5].toUpperCase(), expression: $$[$0-2],
|
|
915
|
+
this.$ = new yy.AggrValue({aggregatorid: $$[$0-5].toUpperCase(), expression: $$[$0-2],
|
|
916
916
|
over:$$[$0]});
|
|
917
917
|
break;
|
|
918
918
|
case 334: case 335:
|
|
@@ -959,16 +959,16 @@ case 348:
|
|
|
959
959
|
break;
|
|
960
960
|
case 349:
|
|
961
961
|
|
|
962
|
-
var funcid = $$[$0-4];
|
|
963
|
-
var exprlist = $$[$0-1];
|
|
964
|
-
if(exprlist.length > 1 && (funcid.toUpperCase() == 'MIN' || funcid.toUpperCase() == 'MAX')) {
|
|
965
|
-
this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
|
|
966
|
-
} else if(alasql.aggr[$$[$0-4]]) {
|
|
967
|
-
this.$ = new yy.AggrValue({aggregatorid: 'REDUCE',
|
|
968
|
-
funcid: funcid, expression: exprlist.pop(),distinct:($$[$0-2]=='DISTINCT') });
|
|
969
|
-
} else {
|
|
970
|
-
this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
|
|
971
|
-
};
|
|
962
|
+
var funcid = $$[$0-4];
|
|
963
|
+
var exprlist = $$[$0-1];
|
|
964
|
+
if(exprlist.length > 1 && (funcid.toUpperCase() == 'MIN' || funcid.toUpperCase() == 'MAX')) {
|
|
965
|
+
this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
|
|
966
|
+
} else if(alasql.aggr[$$[$0-4]]) {
|
|
967
|
+
this.$ = new yy.AggrValue({aggregatorid: 'REDUCE',
|
|
968
|
+
funcid: funcid, expression: exprlist.pop(),distinct:($$[$0-2]?.toUpperCase()=='DISTINCT') });
|
|
969
|
+
} else {
|
|
970
|
+
this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
|
|
971
|
+
};
|
|
972
972
|
|
|
973
973
|
break;
|
|
974
974
|
case 350:
|
|
@@ -1024,9 +1024,9 @@ case 367:
|
|
|
1024
1024
|
break;
|
|
1025
1025
|
case 368:
|
|
1026
1026
|
|
|
1027
|
-
if(!yy.exists) yy.exists = [];
|
|
1028
|
-
this.$ = new yy.ExistsValue({value:$$[$0-1], existsidx:yy.exists.length});
|
|
1029
|
-
yy.exists.push($$[$0-1]);
|
|
1027
|
+
if(!yy.exists) yy.exists = [];
|
|
1028
|
+
this.$ = new yy.ExistsValue({value:$$[$0-1], existsidx:yy.exists.length});
|
|
1029
|
+
yy.exists.push($$[$0-1]);
|
|
1030
1030
|
|
|
1031
1031
|
break;
|
|
1032
1032
|
case 369:
|
|
@@ -1037,14 +1037,14 @@ case 370: case 371:
|
|
|
1037
1037
|
break;
|
|
1038
1038
|
case 372:
|
|
1039
1039
|
|
|
1040
|
-
if(typeof yy.question == 'undefined') yy.question = 0;
|
|
1041
|
-
this.$ = new yy.ParamValue({param: yy.question++});
|
|
1040
|
+
if(typeof yy.question == 'undefined') yy.question = 0;
|
|
1041
|
+
this.$ = new yy.ParamValue({param: yy.question++});
|
|
1042
1042
|
|
|
1043
1043
|
break;
|
|
1044
1044
|
case 373:
|
|
1045
1045
|
|
|
1046
|
-
if(typeof yy.question == 'undefined') yy.question = 0;
|
|
1047
|
-
this.$ = new yy.ParamValue({param: yy.question++, array:true});
|
|
1046
|
+
if(typeof yy.question == 'undefined') yy.question = 0;
|
|
1047
|
+
this.$ = new yy.ParamValue({param: yy.question++, array:true});
|
|
1048
1048
|
|
|
1049
1049
|
break;
|
|
1050
1050
|
case 374:
|
|
@@ -1154,43 +1154,43 @@ case 416:
|
|
|
1154
1154
|
break;
|
|
1155
1155
|
case 417:
|
|
1156
1156
|
|
|
1157
|
-
if(!yy.queries) yy.queries = [];
|
|
1158
|
-
this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1], queriesidx: yy.queries.length});
|
|
1159
|
-
yy.queries.push($$[$0-1]);
|
|
1157
|
+
if(!yy.queries) yy.queries = [];
|
|
1158
|
+
this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1], queriesidx: yy.queries.length});
|
|
1159
|
+
yy.queries.push($$[$0-1]);
|
|
1160
1160
|
|
|
1161
1161
|
break;
|
|
1162
1162
|
case 418:
|
|
1163
1163
|
|
|
1164
|
-
this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1]});
|
|
1164
|
+
this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1]});
|
|
1165
1165
|
|
|
1166
1166
|
break;
|
|
1167
1167
|
case 419:
|
|
1168
1168
|
|
|
1169
|
-
if($$[$0-2].op == 'BETWEEN1') {
|
|
1170
|
-
|
|
1171
|
-
if($$[$0-2].left.op == 'AND') {
|
|
1172
|
-
this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
|
|
1173
|
-
new yy.Op({left:$$[$0-2].left.right, op:'BETWEEN',
|
|
1174
|
-
right1:$$[$0-2].right, right2:$$[$0]})
|
|
1175
|
-
});
|
|
1176
|
-
} else {
|
|
1177
|
-
this.$ = new yy.Op({left:$$[$0-2].left, op:'BETWEEN',
|
|
1178
|
-
right1:$$[$0-2].right, right2:$$[$0]});
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
} else if($$[$0-2].op == 'NOT BETWEEN1') {
|
|
1182
|
-
if($$[$0-2].left.op == 'AND') {
|
|
1183
|
-
this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
|
|
1184
|
-
new yy.Op({left:$$[$0-2].left.right, op:'NOT BETWEEN',
|
|
1185
|
-
right1:$$[$0-2].right, right2:$$[$0]})
|
|
1186
|
-
});
|
|
1187
|
-
} else {
|
|
1188
|
-
this.$ = new yy.Op({left:$$[$0-2].left, op:'NOT BETWEEN',
|
|
1189
|
-
right1:$$[$0-2].right, right2:$$[$0]});
|
|
1190
|
-
}
|
|
1191
|
-
} else {
|
|
1192
|
-
this.$ = new yy.Op({left:$$[$0-2], op:'AND', right:$$[$0]});
|
|
1193
|
-
}
|
|
1169
|
+
if($$[$0-2].op == 'BETWEEN1') {
|
|
1170
|
+
|
|
1171
|
+
if($$[$0-2].left.op == 'AND') {
|
|
1172
|
+
this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
|
|
1173
|
+
new yy.Op({left:$$[$0-2].left.right, op:'BETWEEN',
|
|
1174
|
+
right1:$$[$0-2].right, right2:$$[$0]})
|
|
1175
|
+
});
|
|
1176
|
+
} else {
|
|
1177
|
+
this.$ = new yy.Op({left:$$[$0-2].left, op:'BETWEEN',
|
|
1178
|
+
right1:$$[$0-2].right, right2:$$[$0]});
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
} else if($$[$0-2].op == 'NOT BETWEEN1') {
|
|
1182
|
+
if($$[$0-2].left.op == 'AND') {
|
|
1183
|
+
this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
|
|
1184
|
+
new yy.Op({left:$$[$0-2].left.right, op:'NOT BETWEEN',
|
|
1185
|
+
right1:$$[$0-2].right, right2:$$[$0]})
|
|
1186
|
+
});
|
|
1187
|
+
} else {
|
|
1188
|
+
this.$ = new yy.Op({left:$$[$0-2].left, op:'NOT BETWEEN',
|
|
1189
|
+
right1:$$[$0-2].right, right2:$$[$0]});
|
|
1190
|
+
}
|
|
1191
|
+
} else {
|
|
1192
|
+
this.$ = new yy.Op({left:$$[$0-2], op:'AND', right:$$[$0]});
|
|
1193
|
+
}
|
|
1194
1194
|
|
|
1195
1195
|
break;
|
|
1196
1196
|
case 420:
|
|
@@ -1216,16 +1216,16 @@ case 426:
|
|
|
1216
1216
|
break;
|
|
1217
1217
|
case 427:
|
|
1218
1218
|
|
|
1219
|
-
if(!yy.queries) yy.queries = [];
|
|
1220
|
-
this.$ = new yy.Op({left: $$[$0-4], op:'IN', right:$$[$0-1], queriesidx: yy.queries.length});
|
|
1221
|
-
yy.queries.push($$[$0-1]);
|
|
1219
|
+
if(!yy.queries) yy.queries = [];
|
|
1220
|
+
this.$ = new yy.Op({left: $$[$0-4], op:'IN', right:$$[$0-1], queriesidx: yy.queries.length});
|
|
1221
|
+
yy.queries.push($$[$0-1]);
|
|
1222
1222
|
|
|
1223
1223
|
break;
|
|
1224
1224
|
case 428:
|
|
1225
1225
|
|
|
1226
|
-
if(!yy.queries) yy.queries = [];
|
|
1227
|
-
this.$ = new yy.Op({left: $$[$0-5], op:'NOT IN', right:$$[$0-1], queriesidx: yy.queries.length});
|
|
1228
|
-
yy.queries.push($$[$0-1]);
|
|
1226
|
+
if(!yy.queries) yy.queries = [];
|
|
1227
|
+
this.$ = new yy.Op({left: $$[$0-5], op:'NOT IN', right:$$[$0-1], queriesidx: yy.queries.length});
|
|
1228
|
+
yy.queries.push($$[$0-1]);
|
|
1229
1229
|
|
|
1230
1230
|
break;
|
|
1231
1231
|
case 429:
|
|
@@ -1248,17 +1248,17 @@ case 434: case 436:
|
|
|
1248
1248
|
break;
|
|
1249
1249
|
case 437:
|
|
1250
1250
|
|
|
1251
|
-
/* var expr = $$[$0];
|
|
1252
|
-
if(expr.left && expr.left.op == 'AND') {
|
|
1253
|
-
this.$ = new yy.Op({left:new yy.Op({left:$$[$0-2], op:'BETWEEN', right:expr.left}), op:'AND', right:expr.right });
|
|
1254
|
-
} else {
|
|
1255
|
-
*/
|
|
1256
|
-
this.$ = new yy.Op({left:$$[$0-2], op:'BETWEEN1', right:$$[$0] });
|
|
1251
|
+
/* var expr = $$[$0];
|
|
1252
|
+
if(expr.left && expr.left.op == 'AND') {
|
|
1253
|
+
this.$ = new yy.Op({left:new yy.Op({left:$$[$0-2], op:'BETWEEN', right:expr.left}), op:'AND', right:expr.right });
|
|
1254
|
+
} else {
|
|
1255
|
+
*/
|
|
1256
|
+
this.$ = new yy.Op({left:$$[$0-2], op:'BETWEEN1', right:$$[$0] });
|
|
1257
1257
|
|
|
1258
1258
|
break;
|
|
1259
1259
|
case 438:
|
|
1260
1260
|
|
|
1261
|
-
this.$ = new yy.Op({left:$$[$0-2], op:'NOT BETWEEN1', right:$$[$0] });
|
|
1261
|
+
this.$ = new yy.Op({left:$$[$0-2], op:'NOT BETWEEN1', right:$$[$0] });
|
|
1262
1262
|
|
|
1263
1263
|
break;
|
|
1264
1264
|
case 439:
|
|
@@ -1266,14 +1266,14 @@ case 439:
|
|
|
1266
1266
|
break;
|
|
1267
1267
|
case 440:
|
|
1268
1268
|
|
|
1269
|
-
this.$ = new yy.Op({
|
|
1270
|
-
op:'IS',
|
|
1271
|
-
left:$$[$0-2],
|
|
1272
|
-
right: new yy.UniOp({
|
|
1273
|
-
op:'NOT',
|
|
1274
|
-
right:new yy.NullValue({value:undefined})
|
|
1275
|
-
})
|
|
1276
|
-
});
|
|
1269
|
+
this.$ = new yy.Op({
|
|
1270
|
+
op:'IS',
|
|
1271
|
+
left:$$[$0-2],
|
|
1272
|
+
right: new yy.UniOp({
|
|
1273
|
+
op:'NOT',
|
|
1274
|
+
right:new yy.NullValue({value:undefined})
|
|
1275
|
+
})
|
|
1276
|
+
});
|
|
1277
1277
|
|
|
1278
1278
|
break;
|
|
1279
1279
|
case 441:
|
|
@@ -1353,20 +1353,20 @@ this.$ = $$[$0-2]; $$[$0-2].push($$[$0])
|
|
|
1353
1353
|
break;
|
|
1354
1354
|
case 494:
|
|
1355
1355
|
|
|
1356
|
-
this.$ = new yy.CreateTable({table:$$[$0-4]});
|
|
1357
|
-
yy.extend(this.$,$$[$0-7]);
|
|
1358
|
-
yy.extend(this.$,$$[$0-6]);
|
|
1359
|
-
yy.extend(this.$,$$[$0-5]);
|
|
1360
|
-
yy.extend(this.$,$$[$0-2]);
|
|
1361
|
-
yy.extend(this.$,$$[$0]);
|
|
1356
|
+
this.$ = new yy.CreateTable({table:$$[$0-4]});
|
|
1357
|
+
yy.extend(this.$,$$[$0-7]);
|
|
1358
|
+
yy.extend(this.$,$$[$0-6]);
|
|
1359
|
+
yy.extend(this.$,$$[$0-5]);
|
|
1360
|
+
yy.extend(this.$,$$[$0-2]);
|
|
1361
|
+
yy.extend(this.$,$$[$0]);
|
|
1362
1362
|
|
|
1363
1363
|
break;
|
|
1364
1364
|
case 495:
|
|
1365
1365
|
|
|
1366
|
-
this.$ = new yy.CreateTable({table:$$[$0]});
|
|
1367
|
-
yy.extend(this.$,$$[$0-3]);
|
|
1368
|
-
yy.extend(this.$,$$[$0-2]);
|
|
1369
|
-
yy.extend(this.$,$$[$0-1]);
|
|
1366
|
+
this.$ = new yy.CreateTable({table:$$[$0]});
|
|
1367
|
+
yy.extend(this.$,$$[$0-3]);
|
|
1368
|
+
yy.extend(this.$,$$[$0-2]);
|
|
1369
|
+
yy.extend(this.$,$$[$0-1]);
|
|
1370
1370
|
|
|
1371
1371
|
break;
|
|
1372
1372
|
case 497:
|
|
@@ -1404,7 +1404,7 @@ case 524:
|
|
|
1404
1404
|
break;
|
|
1405
1405
|
case 530:
|
|
1406
1406
|
|
|
1407
|
-
this.$ = {type: 'UNIQUE', columns: $$[$0-1], clustered:($$[$0-3]+'').toUpperCase()};
|
|
1407
|
+
this.$ = {type: 'UNIQUE', columns: $$[$0-1], clustered:($$[$0-3]+'').toUpperCase()};
|
|
1408
1408
|
|
|
1409
1409
|
break;
|
|
1410
1410
|
case 539:
|
|
@@ -1439,7 +1439,7 @@ this.$ = undefined
|
|
|
1439
1439
|
break;
|
|
1440
1440
|
case 552:
|
|
1441
1441
|
|
|
1442
|
-
yy.extend($$[$0-1],$$[$0]); this.$ = $$[$0-1];
|
|
1442
|
+
yy.extend($$[$0-1],$$[$0]); this.$ = $$[$0-1];
|
|
1443
1443
|
|
|
1444
1444
|
break;
|
|
1445
1445
|
case 555:
|
|
@@ -1527,7 +1527,7 @@ case 587:
|
|
|
1527
1527
|
this.$ = new yy.CreateDatabase({engineid:$$[$0-7].toUpperCase(), databaseid:$$[$0-4], args:$$[$0-2], as:$$[$0] }); yy.extend(this.$,$$[$0-5]);
|
|
1528
1528
|
break;
|
|
1529
1529
|
case 588:
|
|
1530
|
-
this.$ = new yy.CreateDatabase({engineid:$$[$0-4].toUpperCase(),
|
|
1530
|
+
this.$ = new yy.CreateDatabase({engineid:$$[$0-4].toUpperCase(),
|
|
1531
1531
|
as:$$[$0], args:[$$[$0-1]] }); yy.extend(this.$,$$[$0-2]);
|
|
1532
1532
|
break;
|
|
1533
1533
|
case 589:
|
|
@@ -1595,16 +1595,16 @@ case 612:
|
|
|
1595
1595
|
break;
|
|
1596
1596
|
case 613:
|
|
1597
1597
|
|
|
1598
|
-
this.$ = new yy.CreateTable({table:$$[$0-6],view:true,select:$$[$0-1],viewcolumns:$$[$0-4]});
|
|
1599
|
-
yy.extend(this.$,$$[$0-9]);
|
|
1600
|
-
yy.extend(this.$,$$[$0-7]);
|
|
1598
|
+
this.$ = new yy.CreateTable({table:$$[$0-6],view:true,select:$$[$0-1],viewcolumns:$$[$0-4]});
|
|
1599
|
+
yy.extend(this.$,$$[$0-9]);
|
|
1600
|
+
yy.extend(this.$,$$[$0-7]);
|
|
1601
1601
|
|
|
1602
1602
|
break;
|
|
1603
1603
|
case 614:
|
|
1604
1604
|
|
|
1605
|
-
this.$ = new yy.CreateTable({table:$$[$0-3],view:true,select:$$[$0-1]});
|
|
1606
|
-
yy.extend(this.$,$$[$0-6]);
|
|
1607
|
-
yy.extend(this.$,$$[$0-4]);
|
|
1605
|
+
this.$ = new yy.CreateTable({table:$$[$0-3],view:true,select:$$[$0-1]});
|
|
1606
|
+
yy.extend(this.$,$$[$0-6]);
|
|
1607
|
+
yy.extend(this.$,$$[$0-4]);
|
|
1608
1608
|
|
|
1609
1609
|
break;
|
|
1610
1610
|
case 618:
|
|
@@ -1692,25 +1692,25 @@ case 672:
|
|
|
1692
1692
|
this.$ = new yy.BeginTransaction();
|
|
1693
1693
|
break;
|
|
1694
1694
|
case 673:
|
|
1695
|
-
this.$ = new yy.If({expression:$$[$0-2],thenstat:$$[$0-1], elsestat:$$[$0]});
|
|
1696
|
-
if($$[$0-1].exists) this.$.exists = $$[$0-1].exists;
|
|
1697
|
-
if($$[$0-1].queries) this.$.queries = $$[$0-1].queries;
|
|
1695
|
+
this.$ = new yy.If({expression:$$[$0-2],thenstat:$$[$0-1], elsestat:$$[$0]});
|
|
1696
|
+
if($$[$0-1].exists) this.$.exists = $$[$0-1].exists;
|
|
1697
|
+
if($$[$0-1].queries) this.$.queries = $$[$0-1].queries;
|
|
1698
1698
|
|
|
1699
1699
|
break;
|
|
1700
1700
|
case 674:
|
|
1701
1701
|
|
|
1702
|
-
this.$ = new yy.If({expression:$$[$0-1],thenstat:$$[$0]});
|
|
1703
|
-
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1704
|
-
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1702
|
+
this.$ = new yy.If({expression:$$[$0-1],thenstat:$$[$0]});
|
|
1703
|
+
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1704
|
+
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1705
1705
|
|
|
1706
1706
|
break;
|
|
1707
1707
|
case 675:
|
|
1708
1708
|
this.$ = $$[$0];
|
|
1709
1709
|
break;
|
|
1710
1710
|
case 676:
|
|
1711
|
-
this.$ = new yy.While({expression:$$[$0-1],loopstat:$$[$0]});
|
|
1712
|
-
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1713
|
-
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1711
|
+
this.$ = new yy.While({expression:$$[$0-1],loopstat:$$[$0]});
|
|
1712
|
+
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1713
|
+
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1714
1714
|
|
|
1715
1715
|
break;
|
|
1716
1716
|
case 677:
|
|
@@ -1760,9 +1760,9 @@ case 698:
|
|
|
1760
1760
|
break;
|
|
1761
1761
|
case 699:
|
|
1762
1762
|
|
|
1763
|
-
this.$ = new yy.Merge(); yy.extend(this.$,$$[$0-4]); yy.extend(this.$,$$[$0-3]);
|
|
1764
|
-
yy.extend(this.$,$$[$0-2]);
|
|
1765
|
-
yy.extend(this.$,{matches:$$[$0-1]});yy.extend(this.$,$$[$0]);
|
|
1763
|
+
this.$ = new yy.Merge(); yy.extend(this.$,$$[$0-4]); yy.extend(this.$,$$[$0-3]);
|
|
1764
|
+
yy.extend(this.$,$$[$0-2]);
|
|
1765
|
+
yy.extend(this.$,{matches:$$[$0-1]});yy.extend(this.$,$$[$0]);
|
|
1766
1766
|
|
|
1767
1767
|
break;
|
|
1768
1768
|
case 700: case 701:
|
|
@@ -1821,8 +1821,8 @@ case 726:
|
|
|
1821
1821
|
break;
|
|
1822
1822
|
case 727:
|
|
1823
1823
|
|
|
1824
|
-
this.$ = new yy.CreateVertex({class:$$[$0-3],sharp:$$[$0-2], name:$$[$0-1]});
|
|
1825
|
-
yy.extend(this.$,$$[$0]);
|
|
1824
|
+
this.$ = new yy.CreateVertex({class:$$[$0-3],sharp:$$[$0-2], name:$$[$0-1]});
|
|
1825
|
+
yy.extend(this.$,$$[$0]);
|
|
1826
1826
|
|
|
1827
1827
|
break;
|
|
1828
1828
|
case 730:
|
|
@@ -1836,8 +1836,8 @@ case 732:
|
|
|
1836
1836
|
break;
|
|
1837
1837
|
case 733:
|
|
1838
1838
|
|
|
1839
|
-
this.$ = new yy.CreateEdge({from:$$[$0-3],to:$$[$0-1],name:$$[$0-5]});
|
|
1840
|
-
yy.extend(this.$,$$[$0]);
|
|
1839
|
+
this.$ = new yy.CreateEdge({from:$$[$0-3],to:$$[$0-1],name:$$[$0-5]});
|
|
1840
|
+
yy.extend(this.$,$$[$0]);
|
|
1841
1841
|
|
|
1842
1842
|
break;
|
|
1843
1843
|
case 734:
|
|
@@ -1848,29 +1848,29 @@ case 735:
|
|
|
1848
1848
|
break;
|
|
1849
1849
|
case 738:
|
|
1850
1850
|
|
|
1851
|
-
this.$ = $$[$0-2];
|
|
1852
|
-
if($$[$0-1]) this.$.json = new yy.Json({value:$$[$0-1]});
|
|
1853
|
-
if($$[$0]) this.$.as = $$[$0];
|
|
1851
|
+
this.$ = $$[$0-2];
|
|
1852
|
+
if($$[$0-1]) this.$.json = new yy.Json({value:$$[$0-1]});
|
|
1853
|
+
if($$[$0]) this.$.as = $$[$0];
|
|
1854
1854
|
|
|
1855
1855
|
break;
|
|
1856
1856
|
case 739:
|
|
1857
1857
|
|
|
1858
|
-
this.$ = {source:$$[$0-6], target: $$[$0]};
|
|
1859
|
-
if($$[$0-3]) this.$.json = new yy.Json({value:$$[$0-3]});
|
|
1860
|
-
if($$[$0-2]) this.$.as = $$[$0-2];
|
|
1861
|
-
yy.extend(this.$,$$[$0-4]);
|
|
1858
|
+
this.$ = {source:$$[$0-6], target: $$[$0]};
|
|
1859
|
+
if($$[$0-3]) this.$.json = new yy.Json({value:$$[$0-3]});
|
|
1860
|
+
if($$[$0-2]) this.$.as = $$[$0-2];
|
|
1861
|
+
yy.extend(this.$,$$[$0-4]);
|
|
1862
1862
|
|
|
1863
1863
|
break;
|
|
1864
1864
|
case 740:
|
|
1865
1865
|
|
|
1866
|
-
this.$ = {source:$$[$0-5], target: $$[$0]};
|
|
1867
|
-
if($$[$0-2]) this.$.json = new yy.Json({value:$$[$0-3]});
|
|
1868
|
-
if($$[$0-1]) this.$.as = $$[$0-2];
|
|
1866
|
+
this.$ = {source:$$[$0-5], target: $$[$0]};
|
|
1867
|
+
if($$[$0-2]) this.$.json = new yy.Json({value:$$[$0-3]});
|
|
1868
|
+
if($$[$0-1]) this.$.as = $$[$0-2];
|
|
1869
1869
|
|
|
1870
1870
|
break;
|
|
1871
1871
|
case 741:
|
|
1872
1872
|
|
|
1873
|
-
this.$ = {source:$$[$0-2], target: $$[$0]};
|
|
1873
|
+
this.$ = {source:$$[$0-2], target: $$[$0]};
|
|
1874
1874
|
|
|
1875
1875
|
break;
|
|
1876
1876
|
case 745:
|
|
@@ -1878,25 +1878,25 @@ case 745:
|
|
|
1878
1878
|
break;
|
|
1879
1879
|
case 748: case 749:
|
|
1880
1880
|
|
|
1881
|
-
var s3 = $$[$0-1];
|
|
1882
|
-
this.$ = {prop:$$[$0-3], sharp:$$[$0-2], name:(typeof s3 == 'undefined')?undefined:s3.substr(1,s3.length-2), class:$$[$0]};
|
|
1881
|
+
var s3 = $$[$0-1];
|
|
1882
|
+
this.$ = {prop:$$[$0-3], sharp:$$[$0-2], name:(typeof s3 == 'undefined')?undefined:s3.substr(1,s3.length-2), class:$$[$0]};
|
|
1883
1883
|
|
|
1884
1884
|
break;
|
|
1885
1885
|
case 750:
|
|
1886
1886
|
|
|
1887
|
-
var s2 = $$[$0-1];
|
|
1888
|
-
this.$ = {sharp:$$[$0-2], name:(typeof s2 == 'undefined')?undefined:s2.substr(1,s2.length-2), class:$$[$0]};
|
|
1887
|
+
var s2 = $$[$0-1];
|
|
1888
|
+
this.$ = {sharp:$$[$0-2], name:(typeof s2 == 'undefined')?undefined:s2.substr(1,s2.length-2), class:$$[$0]};
|
|
1889
1889
|
|
|
1890
1890
|
break;
|
|
1891
1891
|
case 751:
|
|
1892
1892
|
|
|
1893
|
-
var s1 = $$[$0-1];
|
|
1894
|
-
this.$ = {name:(typeof s1 == 'undefined')?undefined:s1.substr(1,s1.length-2), class:$$[$0]};
|
|
1893
|
+
var s1 = $$[$0-1];
|
|
1894
|
+
this.$ = {name:(typeof s1 == 'undefined')?undefined:s1.substr(1,s1.length-2), class:$$[$0]};
|
|
1895
1895
|
|
|
1896
1896
|
break;
|
|
1897
1897
|
case 752:
|
|
1898
1898
|
|
|
1899
|
-
this.$ = {class:$$[$0]};
|
|
1899
|
+
this.$ = {class:$$[$0]};
|
|
1900
1900
|
|
|
1901
1901
|
break;
|
|
1902
1902
|
case 758:
|
|
@@ -1913,21 +1913,21 @@ case 763:
|
|
|
1913
1913
|
break;
|
|
1914
1914
|
case 766:
|
|
1915
1915
|
|
|
1916
|
-
this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-5], action:$$[$0-4], table:$$[$0-2], statement:$$[$0]});
|
|
1917
|
-
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1918
|
-
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1916
|
+
this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-5], action:$$[$0-4], table:$$[$0-2], statement:$$[$0]});
|
|
1917
|
+
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1918
|
+
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1919
1919
|
|
|
1920
1920
|
break;
|
|
1921
1921
|
case 767:
|
|
1922
1922
|
|
|
1923
|
-
this.$ = new yy.CreateTrigger({trigger:$$[$0-5], when:$$[$0-4], action:$$[$0-3], table:$$[$0-1], funcid:$$[$0]});
|
|
1923
|
+
this.$ = new yy.CreateTrigger({trigger:$$[$0-5], when:$$[$0-4], action:$$[$0-3], table:$$[$0-1], funcid:$$[$0]});
|
|
1924
1924
|
|
|
1925
1925
|
break;
|
|
1926
1926
|
case 768:
|
|
1927
1927
|
|
|
1928
|
-
this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-4], action:$$[$0-3], table:$$[$0-5], statement:$$[$0]});
|
|
1929
|
-
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1930
|
-
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1928
|
+
this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-4], action:$$[$0-3], table:$$[$0-5], statement:$$[$0]});
|
|
1929
|
+
if($$[$0].exists) this.$.exists = $$[$0].exists;
|
|
1930
|
+
if($$[$0].queries) this.$.queries = $$[$0].queries;
|
|
1931
1931
|
|
|
1932
1932
|
break;
|
|
1933
1933
|
case 769: case 770: case 772:
|
|
@@ -2215,17 +2215,17 @@ _handle_error:
|
|
|
2215
2215
|
return true;
|
|
2216
2216
|
}};
|
|
2217
2217
|
|
|
2218
|
-
// from https://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
|
|
2219
|
-
// JSON.stringify([].slice.call(document.querySelectorAll('tr')).filter(x => x.children.length == 5 && x.children[2].innerText == 'reserved').map(x => x.children[0].innerText))
|
|
2218
|
+
// from https://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
|
|
2219
|
+
// JSON.stringify([].slice.call(document.querySelectorAll('tr')).filter(x => x.children.length == 5 && x.children[2].innerText == 'reserved').map(x => x.children[0].innerText))
|
|
2220
2220
|
|
|
2221
|
-
var nonReserved = ["A","ABSENT","ABSOLUTE","ACCORDING","ACTION","ADA","ADD","ADMIN","AFTER","ALWAYS","ASC","ASSERTION","ASSIGNMENT","ATTRIBUTE","ATTRIBUTES","BASE64","BEFORE","BERNOULLI","BLOCKED","BOM","BREADTH","C","CASCADE","CATALOG","CATALOG_NAME","CHAIN","CHARACTERISTICS","CHARACTERS","CHARACTER_SET_CATALOG","CHARACTER_SET_NAME","CHARACTER_SET_SCHEMA","CLASS_ORIGIN","COBOL","COLLATION","COLLATION_CATALOG","COLLATION_NAME","COLLATION_SCHEMA","COLUMNS","COLUMN_NAME","COMMAND_FUNCTION","COMMAND_FUNCTION_CODE","COMMITTED","CONDITION_NUMBER","CONNECTION","CONNECTION_NAME","CONSTRAINTS","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONSTRUCTOR","CONTENT","CONTINUE","CONTROL","CURSOR_NAME","DATA","DATETIME_INTERVAL_CODE","DATETIME_INTERVAL_PRECISION","DB","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DEGREE","DEPTH","DERIVED","DESC","DESCRIPTOR","DIAGNOSTICS","DISPATCH","DOCUMENT","DOMAIN","DYNAMIC_FUNCTION","DYNAMIC_FUNCTION_CODE","EMPTY","ENCODING","ENFORCED","EXCLUDE","EXCLUDING","EXPRESSION","FILE","FINAL","FIRST","FLAG","FOLLOWING","FORTRAN","FOUND","FS","G","GENERAL","GENERATED","GO","GOTO","GRANTED","HEX","HIERARCHY","ID","IGNORE","IMMEDIATE","IMMEDIATELY","IMPLEMENTATION","INCLUDING","INCREMENT","INDENT","INITIALLY","INPUT","INSTANCE","INSTANTIABLE","INSTEAD","INTEGRITY","INVOKER","ISOLATION","K","KEY","KEY_MEMBER","KEY_TYPE","LAST","LENGTH","LEVEL","LIBRARY","LIMIT","LINK","LOCATION","LOCATOR","M","MAP","MAPPING","MATCHED","MAXVALUE","MESSAGE_LENGTH","MESSAGE_OCTET_LENGTH","MESSAGE_TEXT","MINVALUE","MORE","MUMPS","NAME","NAMES","NAMESPACE","NESTING","NEXT","NFC","NFD","NFKC","NFKD","NIL","NORMALIZED","NULLABLE","NULLS","NUMBER","OBJECT","OCTETS","OFF","OPTION","OPTIONS","ORDERING","ORDINALITY","OTHERS","OUTPUT","OVERRIDING","P","PAD","PARAMETER_MODE","PARAMETER_NAME","PARAMETER_ORDINAL_POSITION","PARAMETER_SPECIFIC_CATALOG","PARAMETER_SPECIFIC_NAME","PARAMETER_SPECIFIC_SCHEMA","PARTIAL","PASCAL","PASSING","PASSTHROUGH","PATH","PERMISSION","PLACING","PLI","PRECEDING","PRESERVE","PRIOR","PRIVILEGES","PUBLIC","READ","RECOVERY","RELATIVE","REPEATABLE","REQUIRING","RESPECT","RESTART","RESTORE","RESTRICT","RETURNED_CARDINALITY","RETURNED_LENGTH","RETURNED_OCTET_LENGTH","RETURNED_SQLSTATE","RETURNING","ROLE","ROUTINE","ROUTINE_CATALOG","ROUTINE_NAME","ROUTINE_SCHEMA","ROW_COUNT","SCALE","SCHEMA","SCHEMA_NAME","SCOPE_CATALOG","SCOPE_NAME","SCOPE_SCHEMA","SECTION","SECURITY","SELECTIVE","SELF","SEQUENCE","SERIALIZABLE","SERVER","SERVER_NAME","SESSION","SETS","SIMPLE","SIZE","SOURCE","SPACE","SPECIFIC_NAME","STANDALONE","STATE","STATEMENT","STRIP","STRUCTURE","STYLE","SUBCLASS_ORIGIN","T","TABLE_NAME","TEMPORARY","TIES","TOKEN","TOP_LEVEL_COUNT","TRANSACTION","TRANSACTIONS_COMMITTED","TRANSACTIONS_ROLLED_BACK","TRANSACTION_ACTIVE","TRANSFORM","TRANSFORMS","TRIGGER_CATALOG","TRIGGER_NAME","TRIGGER_SCHEMA","TYPE","UNBOUNDED","UNCOMMITTED","UNDER","UNLINK","UNNAMED","UNTYPED","URI","USAGE","USER_DEFINED_TYPE_CATALOG","USER_DEFINED_TYPE_CODE","USER_DEFINED_TYPE_NAME","USER_DEFINED_TYPE_SCHEMA","VALID","VERSION","VIEW","WHITESPACE","WORK","WRAPPER","WRITE","XMLDECLARATION","XMLSCHEMA","YES","ZONE"]
|
|
2221
|
+
var nonReserved = ["A","ABSENT","ABSOLUTE","ACCORDING","ACTION","ADA","ADD","ADMIN","AFTER","ALWAYS","ASC","ASSERTION","ASSIGNMENT","ATTRIBUTE","ATTRIBUTES","BASE64","BEFORE","BERNOULLI","BLOCKED","BOM","BREADTH","C","CASCADE","CATALOG","CATALOG_NAME","CHAIN","CHARACTERISTICS","CHARACTERS","CHARACTER_SET_CATALOG","CHARACTER_SET_NAME","CHARACTER_SET_SCHEMA","CLASS_ORIGIN","COBOL","COLLATION","COLLATION_CATALOG","COLLATION_NAME","COLLATION_SCHEMA","COLUMNS","COLUMN_NAME","COMMAND_FUNCTION","COMMAND_FUNCTION_CODE","COMMITTED","CONDITION_NUMBER","CONNECTION","CONNECTION_NAME","CONSTRAINTS","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONSTRUCTOR","CONTENT","CONTINUE","CONTROL","CURSOR_NAME","DATA","DATETIME_INTERVAL_CODE","DATETIME_INTERVAL_PRECISION","DB","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DEGREE","DEPTH","DERIVED","DESC","DESCRIPTOR","DIAGNOSTICS","DISPATCH","DOCUMENT","DOMAIN","DYNAMIC_FUNCTION","DYNAMIC_FUNCTION_CODE","EMPTY","ENCODING","ENFORCED","EXCLUDE","EXCLUDING","EXPRESSION","FILE","FINAL","FIRST","FLAG","FOLLOWING","FORTRAN","FOUND","FS","G","GENERAL","GENERATED","GO","GOTO","GRANTED","HEX","HIERARCHY","ID","IGNORE","IMMEDIATE","IMMEDIATELY","IMPLEMENTATION","INCLUDING","INCREMENT","INDENT","INITIALLY","INPUT","INSTANCE","INSTANTIABLE","INSTEAD","INTEGRITY","INVOKER","ISOLATION","K","KEY","KEY_MEMBER","KEY_TYPE","LAST","LENGTH","LEVEL","LIBRARY","LIMIT","LINK","LOCATION","LOCATOR","M","MAP","MAPPING","MATCHED","MAXVALUE","MESSAGE_LENGTH","MESSAGE_OCTET_LENGTH","MESSAGE_TEXT","MINVALUE","MORE","MUMPS","NAME","NAMES","NAMESPACE","NESTING","NEXT","NFC","NFD","NFKC","NFKD","NIL","NORMALIZED","NULLABLE","NULLS","NUMBER","OBJECT","OCTETS","OFF","OPTION","OPTIONS","ORDERING","ORDINALITY","OTHERS","OUTPUT","OVERRIDING","P","PAD","PARAMETER_MODE","PARAMETER_NAME","PARAMETER_ORDINAL_POSITION","PARAMETER_SPECIFIC_CATALOG","PARAMETER_SPECIFIC_NAME","PARAMETER_SPECIFIC_SCHEMA","PARTIAL","PASCAL","PASSING","PASSTHROUGH","PATH","PERMISSION","PLACING","PLI","PRECEDING","PRESERVE","PRIOR","PRIVILEGES","PUBLIC","READ","RECOVERY","RELATIVE","REPEATABLE","REQUIRING","RESPECT","RESTART","RESTORE","RESTRICT","RETURNED_CARDINALITY","RETURNED_LENGTH","RETURNED_OCTET_LENGTH","RETURNED_SQLSTATE","RETURNING","ROLE","ROUTINE","ROUTINE_CATALOG","ROUTINE_NAME","ROUTINE_SCHEMA","ROW_COUNT","SCALE","SCHEMA","SCHEMA_NAME","SCOPE_CATALOG","SCOPE_NAME","SCOPE_SCHEMA","SECTION","SECURITY","SELECTIVE","SELF","SEQUENCE","SERIALIZABLE","SERVER","SERVER_NAME","SESSION","SETS","SIMPLE","SIZE","SOURCE","SPACE","SPECIFIC_NAME","STANDALONE","STATE","STATEMENT","STRIP","STRUCTURE","STYLE","SUBCLASS_ORIGIN","T","TABLE_NAME","TEMPORARY","TIES","TOKEN","TOP_LEVEL_COUNT","TRANSACTION","TRANSACTIONS_COMMITTED","TRANSACTIONS_ROLLED_BACK","TRANSACTION_ACTIVE","TRANSFORM","TRANSFORMS","TRIGGER_CATALOG","TRIGGER_NAME","TRIGGER_SCHEMA","TYPE","UNBOUNDED","UNCOMMITTED","UNDER","UNLINK","UNNAMED","UNTYPED","URI","USAGE","USER_DEFINED_TYPE_CATALOG","USER_DEFINED_TYPE_CODE","USER_DEFINED_TYPE_NAME","USER_DEFINED_TYPE_SCHEMA","VALID","VERSION","VIEW","WHITESPACE","WORK","WRAPPER","WRITE","XMLDECLARATION","XMLSCHEMA","YES","ZONE"]
|
|
2222
2222
|
|
|
2223
|
-
parser.parseError = function(str, hash) {
|
|
2224
|
-
if (hash.expected && hash.expected.indexOf("'LITERAL'") > -1 && /[a-zA-Z_][a-zA-Z_0-9]*/.test(hash.token) && nonReserved.indexOf(hash.token) > -1) {
|
|
2225
|
-
return
|
|
2226
|
-
}
|
|
2227
|
-
throw new SyntaxError(str)
|
|
2228
|
-
}
|
|
2223
|
+
parser.parseError = function(str, hash) {
|
|
2224
|
+
if (hash.expected && hash.expected.indexOf("'LITERAL'") > -1 && /[a-zA-Z_][a-zA-Z_0-9]*/.test(hash.token) && nonReserved.indexOf(hash.token) > -1) {
|
|
2225
|
+
return
|
|
2226
|
+
}
|
|
2227
|
+
throw new SyntaxError(str)
|
|
2228
|
+
}
|
|
2229
2229
|
/* generated by jison-lex 0.3.4 */
|
|
2230
2230
|
var lexer = (function(){
|
|
2231
2231
|
var lexer = ({
|
|
@@ -8716,18 +8716,18 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8716
8716
|
if (col.aggregatorid === 'SUM') {
|
|
8717
8717
|
if ('funcid' in col.expression) {
|
|
8718
8718
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8719
|
-
return `'${colas}':(${colexp1})|| typeof ${colexp1} == 'number' ? ${
|
|
8719
|
+
return `'${colas}':(${colexp1})|| typeof ${colexp1} == 'number' ? ${colexp} : null,`;
|
|
8720
8720
|
}
|
|
8721
8721
|
return `'${colas}':(${colexp})|| typeof ${colexp} == 'number' ? ${colexp} : null,`;
|
|
8722
8722
|
} else if (col.aggregatorid === 'TOTAL') {
|
|
8723
8723
|
if ('funcid' in col.expression) {
|
|
8724
8724
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8725
|
-
return `'${colas}':(${colexp1}) || typeof ${colexp1} == 'number' ?
|
|
8726
|
-
${colexp1} : ${colexp1} == 'string' && typeof Number(${colexp1}) == 'number' ? Number(${colexp1}) :
|
|
8725
|
+
return `'${colas}':(${colexp1}) || typeof ${colexp1} == 'number' ?
|
|
8726
|
+
${colexp1} : ${colexp1} == 'string' && typeof Number(${colexp1}) == 'number' ? Number(${colexp1}) :
|
|
8727
8727
|
typeof ${colexp1} == 'boolean' ? Number(${colexp1}) : 0,`;
|
|
8728
8728
|
}
|
|
8729
|
-
return `'${colas}':(${colexp})|| typeof ${colexp} == 'number' ?
|
|
8730
|
-
${colexp} : ${colexp} == 'string' && typeof Number(${colexp}) == 'number' ? Number(${colexp}) :
|
|
8729
|
+
return `'${colas}':(${colexp})|| typeof ${colexp} == 'number' ?
|
|
8730
|
+
${colexp} : ${colexp} == 'string' && typeof Number(${colexp}) == 'number' ? Number(${colexp}) :
|
|
8731
8731
|
typeof ${colexp} === 'boolean' ? Number(${colexp}) : 0,`;
|
|
8732
8732
|
} else if (
|
|
8733
8733
|
col.aggregatorid === 'FIRST' ||
|
|
@@ -8739,18 +8739,19 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8739
8739
|
} else if (col.aggregatorid === 'MIN') {
|
|
8740
8740
|
if ('funcid' in col.expression) {
|
|
8741
8741
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8742
|
-
|
|
8743
|
-
typeof
|
|
8742
|
+
|
|
8743
|
+
return(`'${colas}': (typeof ${colexp1} == 'number' ? ${colexp} : typeof ${colexp1} == 'object' ?
|
|
8744
|
+
typeof Number(${colexp1}) == 'number' && ${colexp1}!== null? ${colexp} : null : null),`);
|
|
8744
8745
|
}
|
|
8745
|
-
return `'${colas}': (typeof ${colexp} == 'number' ? ${colexp} : typeof ${colexp} == 'object' ?
|
|
8746
|
+
return `'${colas}': (typeof ${colexp} == 'number' ? ${colexp} : typeof ${colexp} == 'object' ?
|
|
8746
8747
|
typeof Number(${colexp}) == 'number' && ${colexp}!== null? ${colexp} : null : null),`;
|
|
8747
8748
|
} else if (col.aggregatorid === 'MAX') {
|
|
8748
8749
|
if ('funcid' in col.expression) {
|
|
8749
8750
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8750
|
-
return `'${colas}' : (typeof ${colexp1} == 'number' ? ${
|
|
8751
|
-
typeof Number(${colexp1}) == 'number' ? ${
|
|
8751
|
+
return `'${colas}' : (typeof ${colexp1} == 'number' ? ${colexp} : typeof ${colexp1} == 'object' ?
|
|
8752
|
+
typeof Number(${colexp1}) == 'number' ? ${colexp} : null : null),`;
|
|
8752
8753
|
}
|
|
8753
|
-
return `'${colas}' : (typeof ${colexp} == 'number' ? ${colexp} : typeof ${colexp} == 'object' ?
|
|
8754
|
+
return `'${colas}' : (typeof ${colexp} == 'number' ? ${colexp} : typeof ${colexp} == 'object' ?
|
|
8754
8755
|
typeof Number(${colexp}) == 'number' ? ${colexp} : null : null),`;
|
|
8755
8756
|
} else if (col.aggregatorid === 'ARRAY') {
|
|
8756
8757
|
return "'" + colas + "':[" + colexp + '],';
|
|
@@ -8846,18 +8847,18 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8846
8847
|
pre +
|
|
8847
8848
|
`if(g['${colas}'] == null && ${colexp1} == null){g['${colas}'] = null}
|
|
8848
8849
|
else if(typeof g['${colas}']!== 'object' && typeof g['${colas}']!== 'number' && typeof ${colexp1}!== 'object' && typeof ${colexp1}!== 'number'){g['${colas}'] = null}
|
|
8849
|
-
else if(typeof g['${colas}']!== 'object' && typeof g['${colas}']!== 'number' && typeof ${colexp1} == 'number'){g['${colas}'] = ${
|
|
8850
|
+
else if(typeof g['${colas}']!== 'object' && typeof g['${colas}']!== 'number' && typeof ${colexp1} == 'number'){g['${colas}'] = ${colexp}}
|
|
8850
8851
|
else if(typeof g['${colas}']!== 'number' && typeof ${colexp1}!== 'number' && typeof ${colexp1}!== 'object'){g['${colas}'] = g['${colas}']}
|
|
8851
8852
|
else if((g['${colas}'] == null || (typeof g['${colas}']!== 'number' && typeof g['${colas}']!== 'object')) && (${colexp1} == null || (typeof ${colexp1}!== 'number' && typeof ${colexp1}!== 'object'))){g['${colas}'] = null}
|
|
8852
8853
|
else if(typeof g['${colas}'] == 'number' && typeof ${colexp1} ==null){g['${colas}'] = g['${colas}']}
|
|
8853
|
-
else if(typeof g['${colas}'] == null && typeof ${colexp1} =='number'){g['${colas}'] = ${
|
|
8854
|
-
else{g['${colas}'] += ${
|
|
8854
|
+
else if(typeof g['${colas}'] == null && typeof ${colexp1} =='number'){g['${colas}'] = ${colexp}}
|
|
8855
|
+
else{g['${colas}'] += ${colexp}||0}` +
|
|
8855
8856
|
post
|
|
8856
8857
|
);
|
|
8857
8858
|
}
|
|
8858
8859
|
return (
|
|
8859
8860
|
pre +
|
|
8860
|
-
`if(g['${colas}'] == null && ${colexp} == null){g['${colas}'] = null}
|
|
8861
|
+
`if(g['${colas}'] == null && ${colexp} == null){g['${colas}'] = null}
|
|
8861
8862
|
else if(typeof g['${colas}']!== 'object' && typeof g['${colas}']!== 'number'&& typeof ${colexp}!== 'object' && typeof ${colexp}!== 'number'){g['${colas}'] = null}
|
|
8862
8863
|
else if(typeof g['${colas}']!== 'object' && typeof g['${colas}']!== 'number' && typeof ${colexp} == 'number'){g['${colas}'] = ${colexp}}
|
|
8863
8864
|
else if(typeof g['${colas}']!== 'number' && typeof ${colexp}!== 'number' && typeof ${colexp}!== 'object'){g['${colas}'] = g['${colas}']}
|
|
@@ -8872,7 +8873,7 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8872
8873
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8873
8874
|
return (
|
|
8874
8875
|
pre +
|
|
8875
|
-
`if(typeof g['${colas}'] == 'string' && !isNaN(g['${colas}']) && typeof Number(g['${colas}']) == 'number' &&
|
|
8876
|
+
`if(typeof g['${colas}'] == 'string' && !isNaN(g['${colas}']) && typeof Number(g['${colas}']) == 'number' &&
|
|
8876
8877
|
typeof ${colexp1} == 'string' && !isNaN(${colexp1}) && typeof Number(${colexp1}) == 'number'){g['${colas}'] = Number(g['${colas}']) + Number(${colexp1})}
|
|
8877
8878
|
else if(typeof g['${colas}'] == 'string' && typeof ${colexp1} == 'string'){g['${colas}'] = 0}
|
|
8878
8879
|
else if(typeof g['${colas}'] == 'string' && typeof ${colexp1} == 'number'){g['${colas}'] = ${colexp1}}
|
|
@@ -8883,7 +8884,7 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8883
8884
|
}
|
|
8884
8885
|
return (
|
|
8885
8886
|
pre +
|
|
8886
|
-
`if(typeof g['${colas}'] == 'string' && !isNaN(g['${colas}']) && typeof Number(g['${colas}']) == 'number' &&
|
|
8887
|
+
`if(typeof g['${colas}'] == 'string' && !isNaN(g['${colas}']) && typeof Number(g['${colas}']) == 'number' &&
|
|
8887
8888
|
typeof ${colexp} == 'string' && !isNaN(${colexp}) && typeof Number(${colexp}) == 'number'){g['${colas}'] = Number(g['${colas}']) + Number(${colexp})}
|
|
8888
8889
|
else if(typeof g['${colas}'] == 'string' && typeof ${colexp} == 'string'){g['${colas}'] = 0}
|
|
8889
8890
|
else if(typeof g['${colas}'] == 'string' && typeof ${colexp} == 'number'){g['${colas}'] = ${colexp}}
|
|
@@ -8913,43 +8914,51 @@ yy.Select.prototype.compileGroup = function (query) {
|
|
|
8913
8914
|
} else if (col.aggregatorid === 'MIN') {
|
|
8914
8915
|
if ('funcid' in col.expression) {
|
|
8915
8916
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8916
|
-
|
|
8917
|
+
|
|
8918
|
+
return(
|
|
8917
8919
|
pre +
|
|
8918
|
-
`if((g['${colas}'] == null && ${colexp1}!== null) ? y = ${
|
|
8919
|
-
${colexp1} == null) ? y = g['${colas}']:((y=${
|
|
8920
|
+
`if((g['${colas}'] == null && ${colexp1}!== null) ? y = ${colexp} : (g['${colas}']!== null &&
|
|
8921
|
+
${colexp1} == null) ? y = g['${colas}']:((y=${colexp}) < g['${colas}'])){ if(typeof y == 'number')
|
|
8920
8922
|
{g['${colas}'] = y;}else if(typeof y == 'object' && y instanceof Date){g['${colas}'] = y;}
|
|
8921
8923
|
else if(typeof y == 'object' && typeof Number(y) == 'number'){g['${colas}'] = Number(y);}}
|
|
8922
|
-
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object' && y instanceof Date){g['${colas}'] = g['${colas}']}
|
|
8924
|
+
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object' && y instanceof Date){g['${colas}'] = g['${colas}']}
|
|
8923
8925
|
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object'){g['${colas}'] = Number(g['${colas}'])}` +
|
|
8924
8926
|
post
|
|
8925
8927
|
);
|
|
8926
8928
|
}
|
|
8927
8929
|
return (
|
|
8928
8930
|
pre +
|
|
8929
|
-
`if((g['${colas}'] == null && ${colexp}!== null) ? y = ${colexp} : (g['${colas}']!== null &&
|
|
8931
|
+
`if((g['${colas}'] == null && ${colexp}!== null) ? y = ${colexp} : (g['${colas}']!== null &&
|
|
8930
8932
|
${colexp} == null) ? y = g['${colas}']:((y=${colexp}) < g['${colas}'])){ if(typeof y == 'number')
|
|
8931
8933
|
{g['${colas}'] = y;}else if(typeof y == 'object' && y instanceof Date){g['${colas}'] = y;}
|
|
8932
8934
|
else if(typeof y == 'object' && typeof Number(y) == 'number'){g['${colas}'] = Number(y);}}
|
|
8933
|
-
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object' && y instanceof Date){g['${colas}'] = g['${colas}']}
|
|
8935
|
+
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object' && y instanceof Date){g['${colas}'] = g['${colas}']}
|
|
8934
8936
|
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object'){g['${colas}'] = Number(g['${colas}'])}` +
|
|
8935
8937
|
post
|
|
8936
8938
|
);
|
|
8937
8939
|
} else if (col.aggregatorid === 'MAX') {
|
|
8938
8940
|
if ('funcid' in col.expression) {
|
|
8939
8941
|
let colexp1 = colExpIfFunIdExists(col.expression);
|
|
8940
|
-
|
|
8942
|
+
|
|
8943
|
+
return(
|
|
8941
8944
|
pre +
|
|
8942
|
-
`if((
|
|
8943
|
-
|
|
8944
|
-
else if(typeof y == 'object' &&
|
|
8945
|
+
`if((g['${colas}'] == null && ${colexp1}!== null) ? y = ${colexp} : (g['${colas}']!== null &&
|
|
8946
|
+
${colexp1} == null) ? y = g['${colas}']:((y=${colexp}) > g['${colas}'])){ if(typeof y == 'number')
|
|
8947
|
+
{g['${colas}'] = y;}else if(typeof y == 'object' && y instanceof Date){g['${colas}'] = y;}
|
|
8948
|
+
else if(typeof y == 'object' && typeof Number(y) == 'number'){g['${colas}'] = Number(y);}}
|
|
8949
|
+
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object' && y instanceof Date){g['${colas}'] = g['${colas}']}
|
|
8950
|
+
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object'){g['${colas}'] = Number(g['${colas}'])}` +
|
|
8945
8951
|
post
|
|
8946
8952
|
);
|
|
8947
8953
|
}
|
|
8948
8954
|
return (
|
|
8949
8955
|
pre +
|
|
8950
|
-
`if((
|
|
8951
|
-
|
|
8952
|
-
else if(typeof y == 'object' &&
|
|
8956
|
+
`if((g['${colas}'] == null && ${colexp}!== null) ? y = ${colexp} : (g['${colas}']!== null &&
|
|
8957
|
+
${colexp} == null) ? y = g['${colas}']:((y=${colexp}) > g['${colas}'])){ if(typeof y == 'number')
|
|
8958
|
+
{g['${colas}'] = y;}else if(typeof y == 'object' && y instanceof Date){g['${colas}'] = y;}
|
|
8959
|
+
else if(typeof y == 'object' && typeof Number(y) == 'number'){g['${colas}'] = Number(y);}}
|
|
8960
|
+
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object' && y instanceof Date){g['${colas}'] = g['${colas}']}
|
|
8961
|
+
else if(g['${colas}']!== null && typeof g['${colas}'] == 'object'){g['${colas}'] = Number(g['${colas}'])}` +
|
|
8953
8962
|
post
|
|
8954
8963
|
);
|
|
8955
8964
|
} else if (col.aggregatorid === 'FIRST') {
|