alasql 0.6.6 → 0.6.8

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.fs.js CHANGED
@@ -1,7 +1,7 @@
1
- //! AlaSQL v0.7.1-develop-a2ccc470undefined | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
1
+ //! AlaSQL v0.6.8 | © 2014-2018 Andrey Gershun & Mathias Rangel Wulff | License: MIT
2
2
  /*
3
3
  @module alasql
4
- @version 0.7.1-develop-a2ccc470undefined
4
+ @version 0.6.8
5
5
 
6
6
  AlaSQL - JavaScript SQL database
7
7
  © 2014-2016 Andrey Gershun & Mathias Rangel Wulff
@@ -142,7 +142,7 @@ var alasql = function(sql, params, cb, scope) {
142
142
  Current version of alasql
143
143
  @constant {string}
144
144
  */
145
- alasql.version = '0.7.1-develop-a2ccc470undefined';
145
+ alasql.version = '0.6.8';
146
146
 
147
147
  /**
148
148
  Debug flag
@@ -240,8 +240,8 @@ var $0 = $$.length - 1;
240
240
  switch (yystate) {
241
241
  case 1:
242
242
 
243
- if (alasql.options.casesensitive) this.$ = $$[$0];
244
- else this.$ = $$[$0].toLowerCase();
243
+ if (alasql.options.casesensitive) this.$ = $$[$0];
244
+ else this.$ = $$[$0].toLowerCase();
245
245
 
246
246
  break;
247
247
  case 2:
@@ -273,13 +273,13 @@ case 11:
273
273
  break;
274
274
  case 12:
275
275
 
276
- this.$ = $$[$0];
276
+ this.$ = $$[$0];
277
277
 
278
- // TODO combine exists and queries
279
- if(yy.exists) this.$.exists = yy.exists;
280
- delete yy.exists;
281
- if(yy.queries) this.$.queries = yy.queries;
282
- delete yy.queries;
278
+ // TODO combine exists and queries
279
+ if(yy.exists) this.$.exists = yy.exists;
280
+ delete yy.exists;
281
+ if(yy.queries) this.$.queries = yy.queries;
282
+ delete yy.queries;
283
283
 
284
284
  break;
285
285
  case 13: case 162: case 172: case 237: case 238: case 240: case 248: case 250: case 259: case 270: case 273: case 378: case 494: case 504: case 506: case 518: case 524: case 525: case 570:
@@ -296,20 +296,20 @@ case 71:
296
296
  break;
297
297
  case 72:
298
298
 
299
- yy.extend(this.$,$$[$0-9]); yy.extend(this.$,$$[$0-8]); yy.extend(this.$,$$[$0-7]); yy.extend(this.$,$$[$0-6]);
300
- yy.extend(this.$,$$[$0-5]); yy.extend(this.$,$$[$0-4]);yy.extend(this.$,$$[$0-3]);
301
- yy.extend(this.$,$$[$0-2]); yy.extend(this.$,$$[$0-1]); yy.extend(this.$,$$[$0]);
302
- this.$ = $$[$0-9];
303
- /* if(yy.exists) this.$.exists = yy.exists;
304
- delete yy.exists;
305
- if(yy.queries) this.$.queries = yy.queries;
306
- delete yy.queries;
299
+ yy.extend(this.$,$$[$0-9]); yy.extend(this.$,$$[$0-8]); yy.extend(this.$,$$[$0-7]); yy.extend(this.$,$$[$0-6]);
300
+ yy.extend(this.$,$$[$0-5]); yy.extend(this.$,$$[$0-4]);yy.extend(this.$,$$[$0-3]);
301
+ yy.extend(this.$,$$[$0-2]); yy.extend(this.$,$$[$0-1]); yy.extend(this.$,$$[$0]);
302
+ this.$ = $$[$0-9];
303
+ /* if(yy.exists) this.$.exists = yy.exists;
304
+ delete yy.exists;
305
+ if(yy.queries) this.$.queries = yy.queries;
306
+ delete yy.queries;
307
307
  */
308
308
  break;
309
309
  case 73:
310
310
 
311
- this.$ = new yy.Search({selectors:$$[$0-2], from:$$[$0]});
312
- yy.extend(this.$,$$[$0-1]);
311
+ this.$ = new yy.Search({selectors:$$[$0-2], from:$$[$0]});
312
+ yy.extend(this.$,$$[$0-1]);
313
313
 
314
314
  break;
315
315
  case 74:
@@ -347,9 +347,9 @@ case 91:
347
347
  break;
348
348
  case 92:
349
349
 
350
- var dir = $$[$0-1];
351
- if(!dir) dir = 'ASC';
352
- this.$ = {srchid:"ORDERBY", args: [{expression: new yy.Column({columnid:'_'}), direction:dir}]};
350
+ var dir = $$[$0-1];
351
+ if(!dir) dir = 'ASC';
352
+ this.$ = {srchid:"ORDERBY", args: [{expression: new yy.Column({columnid:'_'}), direction:dir}]};
353
353
 
354
354
  break;
355
355
  case 93:
@@ -516,11 +516,11 @@ case 150:
516
516
  break;
517
517
  case 151:
518
518
 
519
- if(!$$[$0]) {
520
- this.$ = new yy.Select({columns:[new yy.Column({columnid:'_',})], modifier:'COLUMN'});
521
- } else {
522
- this.$ = new yy.Select({ columns:$$[$0] }); yy.extend(this.$, $$[$0-2]);yy.extend(this.$, $$[$0-1]);
523
- }
519
+ if(!$$[$0]) {
520
+ this.$ = new yy.Select({columns:[new yy.Column({columnid:'_',})], modifier:'COLUMN'});
521
+ } else {
522
+ this.$ = new yy.Select({ columns:$$[$0] }); yy.extend(this.$, $$[$0-2]);yy.extend(this.$, $$[$0-1]);
523
+ }
524
524
 
525
525
  break;
526
526
  case 152:
@@ -561,17 +561,17 @@ this.$ = {into: $$[$0]}
561
561
  break;
562
562
  case 168:
563
563
 
564
- var s = $$[$0];
565
- s = s.substr(1,s.length-2);
566
- var x3 = s.substr(-3).toUpperCase();
567
- var x4 = s.substr(-4).toUpperCase();
568
- if(s[0] == '#') {
569
- this.$ = {into: new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
570
- } else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
571
- this.$ = {into: new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
572
- } else if(x4=='XLSX' || x4 == 'JSON') {
573
- this.$ = {into: new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
574
- }
564
+ var s = $$[$0];
565
+ s = s.substr(1,s.length-2);
566
+ var x3 = s.substr(-3).toUpperCase();
567
+ var x4 = s.substr(-4).toUpperCase();
568
+ if(s[0] == '#') {
569
+ this.$ = {into: new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
570
+ } else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
571
+ this.$ = {into: new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
572
+ } else if(x4=='XLSX' || x4 == 'JSON') {
573
+ this.$ = {into: new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]})};
574
+ }
575
575
 
576
576
  break;
577
577
  case 169:
@@ -633,30 +633,30 @@ case 193:
633
633
  break;
634
634
  case 200:
635
635
 
636
- var s = $$[$0];
637
- s = s.substr(1,s.length-2);
638
- var x3 = s.substr(-3).toUpperCase();
639
- var x4 = s.substr(-4).toUpperCase();
640
- var r;
641
- if(s[0] == '#') {
642
- r = new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
643
- } else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
644
- r = new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
645
- } else if(x4=='XLSX' || x4 == 'JSON') {
646
- r = new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
647
- } else {
648
- throw new Error('Unknown string in FROM clause');
649
- };
650
- this.$ = r;
636
+ var s = $$[$0];
637
+ s = s.substr(1,s.length-2);
638
+ var x3 = s.substr(-3).toUpperCase();
639
+ var x4 = s.substr(-4).toUpperCase();
640
+ var r;
641
+ if(s[0] == '#') {
642
+ r = new yy.FuncValue({funcid: 'HTML', args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
643
+ } else if(x3=='XLS' || x3 == 'CSV' || x3=='TAB') {
644
+ r = new yy.FuncValue({funcid: x3, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
645
+ } else if(x4=='XLSX' || x4 == 'JSON') {
646
+ r = new yy.FuncValue({funcid: x4, args:[new yy.StringValue({value: s}), new yy.Json({value:{headers:true}})]});
647
+ } else {
648
+ throw new Error('Unknown string in FROM clause');
649
+ };
650
+ this.$ = r;
651
651
 
652
652
  break;
653
653
  case 201:
654
654
 
655
- if($$[$0-2] == 'INFORMATION_SCHEMA') {
656
- this.$ = new yy.FuncValue({funcid: $$[$0-2], args:[new yy.StringValue({value:$$[$0]})]});
657
- } else {
658
- this.$ = new yy.Table({databaseid: $$[$0-2], tableid:$$[$0]});
659
- }
655
+ if($$[$0-2] == 'INFORMATION_SCHEMA') {
656
+ this.$ = new yy.FuncValue({funcid: $$[$0-2], args:[new yy.StringValue({value:$$[$0]})]});
657
+ } else {
658
+ this.$ = new yy.Table({databaseid: $$[$0-2], tableid:$$[$0]});
659
+ }
660
660
 
661
661
  break;
662
662
  case 202:
@@ -856,10 +856,10 @@ case 306:
856
856
  break;
857
857
  case 309: case 310: case 311:
858
858
 
859
- if(!yy.queries) yy.queries = [];
860
- yy.queries.push($$[$0-1]);
861
- $$[$0-1].queriesidx = yy.queries.length;
862
- this.$ = $$[$0-1];
859
+ if(!yy.queries) yy.queries = [];
860
+ yy.queries.push($$[$0-1]);
861
+ $$[$0-1].queriesidx = yy.queries.length;
862
+ this.$ = $$[$0-1];
863
863
 
864
864
  break;
865
865
  case 312:
@@ -900,18 +900,18 @@ case 329:
900
900
  break;
901
901
  case 330:
902
902
 
903
- if($$[$0-2].length > 1 && ($$[$0-4].toUpperCase() == 'MAX' || $$[$0-4].toUpperCase() == 'MIN')) {
904
- this.$ = new yy.FuncValue({funcid:$$[$0-4],args:$$[$0-2]});
905
- } else {
906
- this.$ = new yy.AggrValue({aggregatorid: $$[$0-4].toUpperCase(), expression: $$[$0-2].pop(), over:$$[$0]});
907
- }
903
+ if($$[$0-2].length > 1 && ($$[$0-4].toUpperCase() == 'MAX' || $$[$0-4].toUpperCase() == 'MIN')) {
904
+ this.$ = new yy.FuncValue({funcid:$$[$0-4],args:$$[$0-2]});
905
+ } else {
906
+ this.$ = new yy.AggrValue({aggregatorid: $$[$0-4].toUpperCase(), expression: $$[$0-2].pop(), over:$$[$0]});
907
+ }
908
908
 
909
909
  break;
910
910
  case 331:
911
911
  this.$ = new yy.AggrValue({aggregatorid: $$[$0-5].toUpperCase(), expression: $$[$0-2], distinct:true, over:$$[$0]});
912
912
  break;
913
913
  case 332:
914
- this.$ = new yy.AggrValue({aggregatorid: $$[$0-5].toUpperCase(), expression: $$[$0-2],
914
+ this.$ = new yy.AggrValue({aggregatorid: $$[$0-5].toUpperCase(), expression: $$[$0-2],
915
915
  over:$$[$0]});
916
916
  break;
917
917
  case 334: case 335:
@@ -955,16 +955,16 @@ case 347:
955
955
  break;
956
956
  case 348:
957
957
 
958
- var funcid = $$[$0-4];
959
- var exprlist = $$[$0-1];
960
- if(exprlist.length > 1 && (funcid.toUpperCase() == 'MIN' || funcid.toUpperCase() == 'MAX')) {
961
- this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
962
- } else if(alasql.aggr[$$[$0-4]]) {
963
- this.$ = new yy.AggrValue({aggregatorid: 'REDUCE',
964
- funcid: funcid, expression: exprlist.pop(),distinct:($$[$0-2]=='DISTINCT') });
965
- } else {
966
- this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
967
- };
958
+ var funcid = $$[$0-4];
959
+ var exprlist = $$[$0-1];
960
+ if(exprlist.length > 1 && (funcid.toUpperCase() == 'MIN' || funcid.toUpperCase() == 'MAX')) {
961
+ this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
962
+ } else if(alasql.aggr[$$[$0-4]]) {
963
+ this.$ = new yy.AggrValue({aggregatorid: 'REDUCE',
964
+ funcid: funcid, expression: exprlist.pop(),distinct:($$[$0-2]=='DISTINCT') });
965
+ } else {
966
+ this.$ = new yy.FuncValue({funcid: funcid, args: exprlist});
967
+ };
968
968
 
969
969
  break;
970
970
  case 349:
@@ -1017,9 +1017,9 @@ case 365:
1017
1017
  break;
1018
1018
  case 366:
1019
1019
 
1020
- if(!yy.exists) yy.exists = [];
1021
- this.$ = new yy.ExistsValue({value:$$[$0-1], existsidx:yy.exists.length});
1022
- yy.exists.push($$[$0-1]);
1020
+ if(!yy.exists) yy.exists = [];
1021
+ this.$ = new yy.ExistsValue({value:$$[$0-1], existsidx:yy.exists.length});
1022
+ yy.exists.push($$[$0-1]);
1023
1023
 
1024
1024
  break;
1025
1025
  case 367:
@@ -1030,14 +1030,14 @@ case 368: case 369:
1030
1030
  break;
1031
1031
  case 370:
1032
1032
 
1033
- if(typeof yy.question == 'undefined') yy.question = 0;
1034
- this.$ = new yy.ParamValue({param: yy.question++});
1033
+ if(typeof yy.question == 'undefined') yy.question = 0;
1034
+ this.$ = new yy.ParamValue({param: yy.question++});
1035
1035
 
1036
1036
  break;
1037
1037
  case 371:
1038
1038
 
1039
- if(typeof yy.question == 'undefined') yy.question = 0;
1040
- this.$ = new yy.ParamValue({param: yy.question++, array:true});
1039
+ if(typeof yy.question == 'undefined') yy.question = 0;
1040
+ this.$ = new yy.ParamValue({param: yy.question++, array:true});
1041
1041
 
1042
1042
  break;
1043
1043
  case 372:
@@ -1147,43 +1147,43 @@ case 414:
1147
1147
  break;
1148
1148
  case 415:
1149
1149
 
1150
- if(!yy.queries) yy.queries = [];
1151
- this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1], queriesidx: yy.queries.length});
1152
- yy.queries.push($$[$0-1]);
1150
+ if(!yy.queries) yy.queries = [];
1151
+ this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1], queriesidx: yy.queries.length});
1152
+ yy.queries.push($$[$0-1]);
1153
1153
 
1154
1154
  break;
1155
1155
  case 416:
1156
1156
 
1157
- this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1]});
1157
+ this.$ = new yy.Op({left:$$[$0-5], op:$$[$0-4] , allsome:$$[$0-3], right:$$[$0-1]});
1158
1158
 
1159
1159
  break;
1160
1160
  case 417:
1161
1161
 
1162
- if($$[$0-2].op == 'BETWEEN1') {
1163
-
1164
- if($$[$0-2].left.op == 'AND') {
1165
- this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
1166
- new yy.Op({left:$$[$0-2].left.right, op:'BETWEEN',
1167
- right1:$$[$0-2].right, right2:$$[$0]})
1168
- });
1169
- } else {
1170
- this.$ = new yy.Op({left:$$[$0-2].left, op:'BETWEEN',
1171
- right1:$$[$0-2].right, right2:$$[$0]});
1172
- }
1173
-
1174
- } else if($$[$0-2].op == 'NOT BETWEEN1') {
1175
- if($$[$0-2].left.op == 'AND') {
1176
- this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
1177
- new yy.Op({left:$$[$0-2].left.right, op:'NOT BETWEEN',
1178
- right1:$$[$0-2].right, right2:$$[$0]})
1179
- });
1180
- } else {
1181
- this.$ = new yy.Op({left:$$[$0-2].left, op:'NOT BETWEEN',
1182
- right1:$$[$0-2].right, right2:$$[$0]});
1183
- }
1184
- } else {
1185
- this.$ = new yy.Op({left:$$[$0-2], op:'AND', right:$$[$0]});
1186
- }
1162
+ if($$[$0-2].op == 'BETWEEN1') {
1163
+
1164
+ if($$[$0-2].left.op == 'AND') {
1165
+ this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
1166
+ new yy.Op({left:$$[$0-2].left.right, op:'BETWEEN',
1167
+ right1:$$[$0-2].right, right2:$$[$0]})
1168
+ });
1169
+ } else {
1170
+ this.$ = new yy.Op({left:$$[$0-2].left, op:'BETWEEN',
1171
+ right1:$$[$0-2].right, right2:$$[$0]});
1172
+ }
1173
+
1174
+ } else if($$[$0-2].op == 'NOT BETWEEN1') {
1175
+ if($$[$0-2].left.op == 'AND') {
1176
+ this.$ = new yy.Op({left:$$[$0-2].left.left,op:'AND',right:
1177
+ new yy.Op({left:$$[$0-2].left.right, op:'NOT BETWEEN',
1178
+ right1:$$[$0-2].right, right2:$$[$0]})
1179
+ });
1180
+ } else {
1181
+ this.$ = new yy.Op({left:$$[$0-2].left, op:'NOT BETWEEN',
1182
+ right1:$$[$0-2].right, right2:$$[$0]});
1183
+ }
1184
+ } else {
1185
+ this.$ = new yy.Op({left:$$[$0-2], op:'AND', right:$$[$0]});
1186
+ }
1187
1187
 
1188
1188
  break;
1189
1189
  case 418:
@@ -1209,16 +1209,16 @@ case 424:
1209
1209
  break;
1210
1210
  case 425:
1211
1211
 
1212
- if(!yy.queries) yy.queries = [];
1213
- this.$ = new yy.Op({left: $$[$0-4], op:'IN', right:$$[$0-1], queriesidx: yy.queries.length});
1214
- yy.queries.push($$[$0-1]);
1212
+ if(!yy.queries) yy.queries = [];
1213
+ this.$ = new yy.Op({left: $$[$0-4], op:'IN', right:$$[$0-1], queriesidx: yy.queries.length});
1214
+ yy.queries.push($$[$0-1]);
1215
1215
 
1216
1216
  break;
1217
1217
  case 426:
1218
1218
 
1219
- if(!yy.queries) yy.queries = [];
1220
- this.$ = new yy.Op({left: $$[$0-5], op:'NOT 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-5], op:'NOT IN', right:$$[$0-1], queriesidx: yy.queries.length});
1221
+ yy.queries.push($$[$0-1]);
1222
1222
 
1223
1223
  break;
1224
1224
  case 427:
@@ -1241,17 +1241,17 @@ case 432: case 434:
1241
1241
  break;
1242
1242
  case 435:
1243
1243
 
1244
- /* var expr = $$[$0];
1245
- if(expr.left && expr.left.op == 'AND') {
1246
- this.$ = new yy.Op({left:new yy.Op({left:$$[$0-2], op:'BETWEEN', right:expr.left}), op:'AND', right:expr.right });
1247
- } else {
1248
- */
1249
- this.$ = new yy.Op({left:$$[$0-2], op:'BETWEEN1', right:$$[$0] });
1244
+ /* var expr = $$[$0];
1245
+ if(expr.left && expr.left.op == 'AND') {
1246
+ this.$ = new yy.Op({left:new yy.Op({left:$$[$0-2], op:'BETWEEN', right:expr.left}), op:'AND', right:expr.right });
1247
+ } else {
1248
+ */
1249
+ this.$ = new yy.Op({left:$$[$0-2], op:'BETWEEN1', right:$$[$0] });
1250
1250
 
1251
1251
  break;
1252
1252
  case 436:
1253
1253
 
1254
- this.$ = new yy.Op({left:$$[$0-2], op:'NOT BETWEEN1', right:$$[$0] });
1254
+ this.$ = new yy.Op({left:$$[$0-2], op:'NOT BETWEEN1', right:$$[$0] });
1255
1255
 
1256
1256
  break;
1257
1257
  case 437:
@@ -1259,14 +1259,14 @@ case 437:
1259
1259
  break;
1260
1260
  case 438:
1261
1261
 
1262
- this.$ = new yy.Op({
1263
- op:'IS',
1264
- left:$$[$0-2],
1265
- right: new yy.UniOp({
1266
- op:'NOT',
1267
- right:new yy.NullValue({value:undefined})
1268
- })
1269
- });
1262
+ this.$ = new yy.Op({
1263
+ op:'IS',
1264
+ left:$$[$0-2],
1265
+ right: new yy.UniOp({
1266
+ op:'NOT',
1267
+ right:new yy.NullValue({value:undefined})
1268
+ })
1269
+ });
1270
1270
 
1271
1271
  break;
1272
1272
  case 439:
@@ -1346,20 +1346,20 @@ this.$ = $$[$0-2]; $$[$0-2].push($$[$0])
1346
1346
  break;
1347
1347
  case 492:
1348
1348
 
1349
- this.$ = new yy.CreateTable({table:$$[$0-4]});
1350
- yy.extend(this.$,$$[$0-7]);
1351
- yy.extend(this.$,$$[$0-6]);
1352
- yy.extend(this.$,$$[$0-5]);
1353
- yy.extend(this.$,$$[$0-2]);
1354
- yy.extend(this.$,$$[$0]);
1349
+ this.$ = new yy.CreateTable({table:$$[$0-4]});
1350
+ yy.extend(this.$,$$[$0-7]);
1351
+ yy.extend(this.$,$$[$0-6]);
1352
+ yy.extend(this.$,$$[$0-5]);
1353
+ yy.extend(this.$,$$[$0-2]);
1354
+ yy.extend(this.$,$$[$0]);
1355
1355
 
1356
1356
  break;
1357
1357
  case 493:
1358
1358
 
1359
- this.$ = new yy.CreateTable({table:$$[$0]});
1360
- yy.extend(this.$,$$[$0-3]);
1361
- yy.extend(this.$,$$[$0-2]);
1362
- yy.extend(this.$,$$[$0-1]);
1359
+ this.$ = new yy.CreateTable({table:$$[$0]});
1360
+ yy.extend(this.$,$$[$0-3]);
1361
+ yy.extend(this.$,$$[$0-2]);
1362
+ yy.extend(this.$,$$[$0-1]);
1363
1363
 
1364
1364
  break;
1365
1365
  case 495:
@@ -1397,7 +1397,7 @@ case 522:
1397
1397
  break;
1398
1398
  case 528:
1399
1399
 
1400
- this.$ = {type: 'UNIQUE', columns: $$[$0-1], clustered:($$[$0-3]+'').toUpperCase()};
1400
+ this.$ = {type: 'UNIQUE', columns: $$[$0-1], clustered:($$[$0-3]+'').toUpperCase()};
1401
1401
 
1402
1402
  break;
1403
1403
  case 537:
@@ -1432,7 +1432,7 @@ this.$ = undefined
1432
1432
  break;
1433
1433
  case 550:
1434
1434
 
1435
- yy.extend($$[$0-1],$$[$0]); this.$ = $$[$0-1];
1435
+ yy.extend($$[$0-1],$$[$0]); this.$ = $$[$0-1];
1436
1436
 
1437
1437
  break;
1438
1438
  case 553:
@@ -1520,7 +1520,7 @@ case 585:
1520
1520
  this.$ = new yy.CreateDatabase({engineid:$$[$0-7].toUpperCase(), databaseid:$$[$0-4], args:$$[$0-2], as:$$[$0] }); yy.extend(this.$,$$[$0-5]);
1521
1521
  break;
1522
1522
  case 586:
1523
- this.$ = new yy.CreateDatabase({engineid:$$[$0-4].toUpperCase(),
1523
+ this.$ = new yy.CreateDatabase({engineid:$$[$0-4].toUpperCase(),
1524
1524
  as:$$[$0], args:[$$[$0-1]] }); yy.extend(this.$,$$[$0-2]);
1525
1525
  break;
1526
1526
  case 587:
@@ -1588,16 +1588,16 @@ case 610:
1588
1588
  break;
1589
1589
  case 611:
1590
1590
 
1591
- this.$ = new yy.CreateTable({table:$$[$0-6],view:true,select:$$[$0-1],viewcolumns:$$[$0-4]});
1592
- yy.extend(this.$,$$[$0-9]);
1593
- yy.extend(this.$,$$[$0-7]);
1591
+ this.$ = new yy.CreateTable({table:$$[$0-6],view:true,select:$$[$0-1],viewcolumns:$$[$0-4]});
1592
+ yy.extend(this.$,$$[$0-9]);
1593
+ yy.extend(this.$,$$[$0-7]);
1594
1594
 
1595
1595
  break;
1596
1596
  case 612:
1597
1597
 
1598
- this.$ = new yy.CreateTable({table:$$[$0-3],view:true,select:$$[$0-1]});
1599
- yy.extend(this.$,$$[$0-6]);
1600
- yy.extend(this.$,$$[$0-4]);
1598
+ this.$ = new yy.CreateTable({table:$$[$0-3],view:true,select:$$[$0-1]});
1599
+ yy.extend(this.$,$$[$0-6]);
1600
+ yy.extend(this.$,$$[$0-4]);
1601
1601
 
1602
1602
  break;
1603
1603
  case 616:
@@ -1685,25 +1685,25 @@ case 670:
1685
1685
  this.$ = new yy.BeginTransaction();
1686
1686
  break;
1687
1687
  case 671:
1688
- this.$ = new yy.If({expression:$$[$0-2],thenstat:$$[$0-1], elsestat:$$[$0]});
1689
- if($$[$0-1].exists) this.$.exists = $$[$0-1].exists;
1690
- if($$[$0-1].queries) this.$.queries = $$[$0-1].queries;
1688
+ this.$ = new yy.If({expression:$$[$0-2],thenstat:$$[$0-1], elsestat:$$[$0]});
1689
+ if($$[$0-1].exists) this.$.exists = $$[$0-1].exists;
1690
+ if($$[$0-1].queries) this.$.queries = $$[$0-1].queries;
1691
1691
 
1692
1692
  break;
1693
1693
  case 672:
1694
1694
 
1695
- this.$ = new yy.If({expression:$$[$0-1],thenstat:$$[$0]});
1696
- if($$[$0].exists) this.$.exists = $$[$0].exists;
1697
- if($$[$0].queries) this.$.queries = $$[$0].queries;
1695
+ this.$ = new yy.If({expression:$$[$0-1],thenstat:$$[$0]});
1696
+ if($$[$0].exists) this.$.exists = $$[$0].exists;
1697
+ if($$[$0].queries) this.$.queries = $$[$0].queries;
1698
1698
 
1699
1699
  break;
1700
1700
  case 673:
1701
1701
  this.$ = $$[$0];
1702
1702
  break;
1703
1703
  case 674:
1704
- this.$ = new yy.While({expression:$$[$0-1],loopstat:$$[$0]});
1705
- if($$[$0].exists) this.$.exists = $$[$0].exists;
1706
- if($$[$0].queries) this.$.queries = $$[$0].queries;
1704
+ this.$ = new yy.While({expression:$$[$0-1],loopstat:$$[$0]});
1705
+ if($$[$0].exists) this.$.exists = $$[$0].exists;
1706
+ if($$[$0].queries) this.$.queries = $$[$0].queries;
1707
1707
 
1708
1708
  break;
1709
1709
  case 675:
@@ -1753,9 +1753,9 @@ case 696:
1753
1753
  break;
1754
1754
  case 697:
1755
1755
 
1756
- this.$ = new yy.Merge(); yy.extend(this.$,$$[$0-4]); yy.extend(this.$,$$[$0-3]);
1757
- yy.extend(this.$,$$[$0-2]);
1758
- yy.extend(this.$,{matches:$$[$0-1]});yy.extend(this.$,$$[$0]);
1756
+ this.$ = new yy.Merge(); yy.extend(this.$,$$[$0-4]); yy.extend(this.$,$$[$0-3]);
1757
+ yy.extend(this.$,$$[$0-2]);
1758
+ yy.extend(this.$,{matches:$$[$0-1]});yy.extend(this.$,$$[$0]);
1759
1759
 
1760
1760
  break;
1761
1761
  case 698: case 699:
@@ -1814,8 +1814,8 @@ case 724:
1814
1814
  break;
1815
1815
  case 725:
1816
1816
 
1817
- this.$ = new yy.CreateVertex({class:$$[$0-3],sharp:$$[$0-2], name:$$[$0-1]});
1818
- yy.extend(this.$,$$[$0]);
1817
+ this.$ = new yy.CreateVertex({class:$$[$0-3],sharp:$$[$0-2], name:$$[$0-1]});
1818
+ yy.extend(this.$,$$[$0]);
1819
1819
 
1820
1820
  break;
1821
1821
  case 728:
@@ -1829,8 +1829,8 @@ case 730:
1829
1829
  break;
1830
1830
  case 731:
1831
1831
 
1832
- this.$ = new yy.CreateEdge({from:$$[$0-3],to:$$[$0-1],name:$$[$0-5]});
1833
- yy.extend(this.$,$$[$0]);
1832
+ this.$ = new yy.CreateEdge({from:$$[$0-3],to:$$[$0-1],name:$$[$0-5]});
1833
+ yy.extend(this.$,$$[$0]);
1834
1834
 
1835
1835
  break;
1836
1836
  case 732:
@@ -1841,29 +1841,29 @@ case 733:
1841
1841
  break;
1842
1842
  case 736:
1843
1843
 
1844
- this.$ = $$[$0-2];
1845
- if($$[$0-1]) this.$.json = new yy.Json({value:$$[$0-1]});
1846
- if($$[$0]) this.$.as = $$[$0];
1844
+ this.$ = $$[$0-2];
1845
+ if($$[$0-1]) this.$.json = new yy.Json({value:$$[$0-1]});
1846
+ if($$[$0]) this.$.as = $$[$0];
1847
1847
 
1848
1848
  break;
1849
1849
  case 737:
1850
1850
 
1851
- this.$ = {source:$$[$0-6], target: $$[$0]};
1852
- if($$[$0-3]) this.$.json = new yy.Json({value:$$[$0-3]});
1853
- if($$[$0-2]) this.$.as = $$[$0-2];
1854
- yy.extend(this.$,$$[$0-4]);
1851
+ this.$ = {source:$$[$0-6], target: $$[$0]};
1852
+ if($$[$0-3]) this.$.json = new yy.Json({value:$$[$0-3]});
1853
+ if($$[$0-2]) this.$.as = $$[$0-2];
1854
+ yy.extend(this.$,$$[$0-4]);
1855
1855
 
1856
1856
  break;
1857
1857
  case 738:
1858
1858
 
1859
- this.$ = {source:$$[$0-5], target: $$[$0]};
1860
- if($$[$0-2]) this.$.json = new yy.Json({value:$$[$0-3]});
1861
- if($$[$0-1]) this.$.as = $$[$0-2];
1859
+ this.$ = {source:$$[$0-5], target: $$[$0]};
1860
+ if($$[$0-2]) this.$.json = new yy.Json({value:$$[$0-3]});
1861
+ if($$[$0-1]) this.$.as = $$[$0-2];
1862
1862
 
1863
1863
  break;
1864
1864
  case 739:
1865
1865
 
1866
- this.$ = {source:$$[$0-2], target: $$[$0]};
1866
+ this.$ = {source:$$[$0-2], target: $$[$0]};
1867
1867
 
1868
1868
  break;
1869
1869
  case 743:
@@ -1871,25 +1871,25 @@ case 743:
1871
1871
  break;
1872
1872
  case 746: case 747:
1873
1873
 
1874
- var s3 = $$[$0-1];
1875
- this.$ = {prop:$$[$0-3], sharp:$$[$0-2], name:(typeof s3 == 'undefined')?undefined:s3.substr(1,s3.length-2), class:$$[$0]};
1874
+ var s3 = $$[$0-1];
1875
+ this.$ = {prop:$$[$0-3], sharp:$$[$0-2], name:(typeof s3 == 'undefined')?undefined:s3.substr(1,s3.length-2), class:$$[$0]};
1876
1876
 
1877
1877
  break;
1878
1878
  case 748:
1879
1879
 
1880
- var s2 = $$[$0-1];
1881
- this.$ = {sharp:$$[$0-2], name:(typeof s2 == 'undefined')?undefined:s2.substr(1,s2.length-2), class:$$[$0]};
1880
+ var s2 = $$[$0-1];
1881
+ this.$ = {sharp:$$[$0-2], name:(typeof s2 == 'undefined')?undefined:s2.substr(1,s2.length-2), class:$$[$0]};
1882
1882
 
1883
1883
  break;
1884
1884
  case 749:
1885
1885
 
1886
- var s1 = $$[$0-1];
1887
- this.$ = {name:(typeof s1 == 'undefined')?undefined:s1.substr(1,s1.length-2), class:$$[$0]};
1886
+ var s1 = $$[$0-1];
1887
+ this.$ = {name:(typeof s1 == 'undefined')?undefined:s1.substr(1,s1.length-2), class:$$[$0]};
1888
1888
 
1889
1889
  break;
1890
1890
  case 750:
1891
1891
 
1892
- this.$ = {class:$$[$0]};
1892
+ this.$ = {class:$$[$0]};
1893
1893
 
1894
1894
  break;
1895
1895
  case 756:
@@ -1906,21 +1906,21 @@ case 761:
1906
1906
  break;
1907
1907
  case 764:
1908
1908
 
1909
- this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-5], action:$$[$0-4], table:$$[$0-2], statement:$$[$0]});
1910
- if($$[$0].exists) this.$.exists = $$[$0].exists;
1911
- if($$[$0].queries) this.$.queries = $$[$0].queries;
1909
+ this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-5], action:$$[$0-4], table:$$[$0-2], statement:$$[$0]});
1910
+ if($$[$0].exists) this.$.exists = $$[$0].exists;
1911
+ if($$[$0].queries) this.$.queries = $$[$0].queries;
1912
1912
 
1913
1913
  break;
1914
1914
  case 765:
1915
1915
 
1916
- this.$ = new yy.CreateTrigger({trigger:$$[$0-5], when:$$[$0-4], action:$$[$0-3], table:$$[$0-1], funcid:$$[$0]});
1916
+ this.$ = new yy.CreateTrigger({trigger:$$[$0-5], when:$$[$0-4], action:$$[$0-3], table:$$[$0-1], funcid:$$[$0]});
1917
1917
 
1918
1918
  break;
1919
1919
  case 766:
1920
1920
 
1921
- this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-4], action:$$[$0-3], table:$$[$0-5], statement:$$[$0]});
1922
- if($$[$0].exists) this.$.exists = $$[$0].exists;
1923
- if($$[$0].queries) this.$.queries = $$[$0].queries;
1921
+ this.$ = new yy.CreateTrigger({trigger:$$[$0-6], when:$$[$0-4], action:$$[$0-3], table:$$[$0-5], statement:$$[$0]});
1922
+ if($$[$0].exists) this.$.exists = $$[$0].exists;
1923
+ if($$[$0].queries) this.$.queries = $$[$0].queries;
1924
1924
 
1925
1925
  break;
1926
1926
  case 767: case 768: case 770:
@@ -2208,17 +2208,17 @@ _handle_error:
2208
2208
  return true;
2209
2209
  }};
2210
2210
 
2211
- // from https://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
2212
- // JSON.stringify([].slice.call(document.querySelectorAll('tr')).filter(x => x.children.length == 5 && x.children[2].innerText == 'reserved').map(x => x.children[0].innerText))
2211
+ // from https://www.postgresql.org/docs/current/static/sql-keywords-appendix.html
2212
+ // JSON.stringify([].slice.call(document.querySelectorAll('tr')).filter(x => x.children.length == 5 && x.children[2].innerText == 'reserved').map(x => x.children[0].innerText))
2213
2213
 
2214
- 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"]
2214
+ 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"]
2215
2215
 
2216
- parser.parseError = function(str, hash) {
2217
- if (hash.expected && hash.expected.indexOf("'LITERAL'") > -1 && /[a-zA-Z_][a-zA-Z_0-9]*/.test(hash.token) && nonReserved.indexOf(hash.token) > -1) {
2218
- return
2219
- }
2220
- throw new SyntaxError(str)
2221
- }
2216
+ parser.parseError = function(str, hash) {
2217
+ if (hash.expected && hash.expected.indexOf("'LITERAL'") > -1 && /[a-zA-Z_][a-zA-Z_0-9]*/.test(hash.token) && nonReserved.indexOf(hash.token) > -1) {
2218
+ return
2219
+ }
2220
+ throw new SyntaxError(str)
2221
+ }
2222
2222
  /* generated by jison-lex 0.3.4 */
2223
2223
  var lexer = (function(){
2224
2224
  var lexer = ({
@@ -3101,7 +3101,7 @@ case 275:return 'INVALID'
3101
3101
  break;
3102
3102
  }
3103
3103
  },
3104
- rules: [/^(?:``([^\`])+``)/i,/^(?:\[\?\])/i,/^(?:@\[)/i,/^(?:ARRAY\[)/i,/^(?:\[([^\]'])*?\])/i,/^(?:`([^\`'])*?`)/i,/^(?:N(['](\\.|[^']|\\')*?['])+)/i,/^(?:X(['](\\.|[^']|\\')*?['])+)/i,/^(?:(['](\\.|[^']|\\')*?['])+)/i,/^(?:(["](\\.|[^"]|\\")*?["])+)/i,/^(?:--(.*?)($|\r\n|\r|\n))/i,/^(?:\s+)/i,/^(?:\|\|)/i,/^(?:\|)/i,/^(?:VALUE\s+OF\s+SEARCH\b)/i,/^(?:VALUE\s+OF\s+SELECT\b)/i,/^(?:ROW\s+OF\s+SELECT\b)/i,/^(?:COLUMN\s+OF\s+SELECT\b)/i,/^(?:MATRIX\s+OF\s+SELECT\b)/i,/^(?:INDEX\s+OF\s+SELECT\b)/i,/^(?:RECORDSET\s+OF\s+SELECT\b)/i,/^(?:TEXT\s+OF\s+SELECT\b)/i,/^(?:SELECT\b)/i,/^(?:ABSOLUTE\b)/i,/^(?:ACTION\b)/i,/^(?:ADD\b)/i,/^(?:AFTER\b)/i,/^(?:AGGR\b)/i,/^(?:AGGREGATE\b)/i,/^(?:AGGREGATOR\b)/i,/^(?:ALL\b)/i,/^(?:ALTER\b)/i,/^(?:AND\b)/i,/^(?:ANTI\b)/i,/^(?:ANY\b)/i,/^(?:APPLY\b)/i,/^(?:ARRAY\b)/i,/^(?:AS\b)/i,/^(?:ASSERT\b)/i,/^(?:ASC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)/i,/^(?:VERTEX\b)/i,/^(?:VIEW\b)/i,/^(?:WHEN\b)/i,/^(?:WHERE\b)/i,/^(?:WHILE\b)/i,/^(?:WITH\b)/i,/^(?:WORK\b)/i,/^(?:(\d*[.])?\d+[eE]\d+)/i,/^(?:(\d*[.])?\d+)/i,/^(?:->)/i,/^(?:#)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\*)/i,/^(?:\/)/i,/^(?:%)/i,/^(?:!===)/i,/^(?:===)/i,/^(?:!==)/i,/^(?:==)/i,/^(?:>=)/i,/^(?:&)/i,/^(?:\|)/i,/^(?:<<)/i,/^(?:>>)/i,/^(?:>)/i,/^(?:<=)/i,/^(?:<>)/i,/^(?:<)/i,/^(?:=)/i,/^(?:!=)/i,/^(?:\()/i,/^(?:\))/i,/^(?:@)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:\])/i,/^(?::-)/i,/^(?:\?-)/i,/^(?:\.\.)/i,/^(?:\.)/i,/^(?:,)/i,/^(?:::)/i,/^(?::)/i,/^(?:;)/i,/^(?:\$)/i,/^(?:\?)/i,/^(?:!)/i,/^(?:\^)/i,/^(?:~)/i,/^(?:[0-9]*[a-zA-Z_]+[a-zA-Z_0-9]*)/i,/^(?:$)/i,/^(?:.)/i],
3105
3105
  conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275],"inclusive":true}}
3106
3106
  });
3107
3107
  return lexer;
@@ -4027,11 +4027,11 @@ var cloneDeep = (utils.cloneDeep = function cloneDeep(obj) {
4027
4027
  return +obj;
4028
4028
  }
4029
4029
 
4030
- var temp = obj.constructor(); // changed
4030
+ var temp = (Object.prototype.hasOwnProperty.call(obj, 'constructor') ? Object : obj.constructor)(); // changed
4031
4031
 
4032
4032
  for (var key in obj) {
4033
4033
  if (obj.hasOwnProperty(key)) {
4034
- temp[key] = cloneDeep(obj[key]);
4034
+ /* A "__proto__" key from parsed data is copied as data, never as the prototype */ if (key === '__proto__') { Object.defineProperty(temp, key, {value: cloneDeep(obj[key]), writable: true, enumerable: true, configurable: true}); } else { temp[key] = cloneDeep(obj[key]); }
4035
4035
  }
4036
4036
  }
4037
4037
  return temp;
@@ -4103,7 +4103,7 @@ var extend = (utils.extend = function extend(a, b) {
4103
4103
  a = a || {};
4104
4104
  for (var key in b) {
4105
4105
  if (b.hasOwnProperty(key)) {
4106
- a[key] = b[key];
4106
+ /* A "__proto__" key from parsed data is copied as data, never as the prototype */ if (key === '__proto__') { Object.defineProperty(a, key, {value: b[key], writable: true, enumerable: true, configurable: true}); } else { a[key] = b[key]; }
4107
4107
  }
4108
4108
  }
4109
4109
  return a;
@@ -6954,7 +6954,7 @@ function queryfn3(query) {
6954
6954
 
6955
6955
  if (query.groupfn) {
6956
6956
  query.data = [];
6957
- if (query.groups.length === 0 && query.allgroups.length === 0) {
6957
+ if (0 === query.groups.length) {
6958
6958
  var g = {};
6959
6959
  if (query.selectGroup.length > 0) {
6960
6960
 
@@ -9061,7 +9061,7 @@ yy.Select.prototype.compileGroup = function (query) {
9061
9061
  aft2 = '';
9062
9062
 
9063
9063
  if (typeof query.groupStar !== 'undefined') {
9064
- aft2 += "for(var f in p['" + query.groupStar + "']) {g[f]=p['" + query.groupStar + "'][f];};";
9064
+ aft2 += "for(var f in p['" + query.groupStar + "']) {if(/^__proto__$/.test(f))Object.defineProperty(g,f,{writable:true,enumerable:true,configurable:true});g[f]=p['" + query.groupStar + "'][f];};";
9065
9065
  }
9066
9066
 
9067
9067
  /*
@@ -9384,7 +9384,7 @@ function compileSelectStar(query, aliases, joinstar) {
9384
9384
  } else {
9385
9385
 
9386
9386
  // if column not exist, then copy all
9387
- sp += 'var w=p["' + alias + '"];for(var k in w){r[k]=w[k]};';
9387
+ sp += 'var w=p["' + alias + '"];for(var k in w){if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=w[k]};';
9388
9388
 
9389
9389
  query.dirtyColumns = true;
9390
9390
  }
@@ -9713,10 +9713,10 @@ yy.Select.prototype.compileSelectGroup1 = function (query) {
9713
9713
  self.columns.forEach(function (col) {
9714
9714
 
9715
9715
  if (col instanceof yy.Column && col.columnid === '*') {
9716
- // s += 'for(var k in g){r[k]=g[k]};';
9716
+ // s += 'for(var k in g){if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=g[k]};';
9717
9717
  // s += 'for(var k in this.query.groupColumns){r[k]=g[this.query.groupColumns[k]]};';
9718
9718
 
9719
- s += 'for(var k in g) {r[k]=g[k]};';
9719
+ s += 'for(var k in g) {if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=g[k]};';
9720
9720
  return '';
9721
9721
 
9722
9722
  } else {
@@ -13022,7 +13022,7 @@ yy.CreateTable.prototype.execute = function (databaseid, params, cb) {
13022
13022
 
13023
13023
  table.update(
13024
13024
  function (t) {
13025
- for (var f in r) t[f] = r[f];
13025
+ for (var f in r) {if(/^__proto__$/.test(f))Object.defineProperty(t,f,{writable:true,enumerable:true,configurable:true});t[f] = r[f];}
13026
13026
  },
13027
13027
  table.data.indexOf(toreplace),
13028
13028
  params
@@ -14568,7 +14568,7 @@ yy.Insert.prototype.compile = function (databaseid) {
14568
14568
  });
14569
14569
  } else {
14570
14570
 
14571
- // sw = 'var w='+JSONtoJS(values)+';for(var k in w){r[k]=w[k]};';
14571
+ // sw = 'var w='+JSONtoJS(values)+';for(var k in w){if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=w[k]};';
14572
14572
  sw = JSONtoJS(values);
14573
14573
  }
14574
14574
  }