alasql 0.1.9 → 0.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/.bithoundrc +2 -1
- package/.bower.json +4 -4
- package/CHANGELOG.md +5 -0
- package/README.md +1 -1
- package/console/alasql.min.js +17 -10
- package/dist/alasql-worker.js +1 -1
- package/dist/alasql.js +823 -776
- package/dist/alasql.min.js +17 -10
- package/examples/country/city.js +16 -0
- package/examples/nodesample.js +16 -0
- package/examples/other/test.js +20 -0
- package/examples/param.js +4 -0
- package/examples/promise.js +10 -0
- package/examples/simple/ex102.js +10 -0
- package/examples/simple/jquery.js +6 -0
- package/examples/sqlite/test.js +5 -0
- package/gulpfile.js +3 -3
- package/meteor/.versions +2 -2
- package/meteor/package.js +1 -1
- package/package.json +21 -21
- package/src/05copyright.js +2 -2
- package/src/10start.js +1 -1
- package/src/15utility.js +43 -36
- package/src/38query.js +28 -25
- package/src/424select.js +2 -2
- package/src/50expression.js +50 -45
- package/src/55functions.js +26 -0
- package/src/70insert.js +1 -1
- package/src/72delete.js +206 -0
- package/src/alasqlparser.jison +8 -0
- package/src/alasqlparser.js +670 -664
- package/stuff/keywords/badwords.md +7 -0
- package/test/callback/cb1.js +59 -0
- package/test/callback/cb2.js +45 -0
- package/test/future/test119.js +77 -0
- package/test/future/test123.js +91 -0
- package/test/future/test131.js +30 -0
- package/test/future/test132.js +69 -0
- package/test/future/test134.js +51 -0
- package/test/future/test135.js +28 -0
- package/test/future/test136.js +23 -0
- package/test/future/test147.js +27 -0
- package/test/test240.js +132 -0
- package/test/test245.js +100 -0
- package/test/test247.js +84 -0
- package/test/test351.js +31 -0
- package/test/test352.js +49 -0
- /package/src/{alasqlparser1.jison → alasqlparser1_.jison} +0 -0
- /package/src/{alasqlparser1.js → alasqlparser1_.js} +0 -0
package/src/15utility.js
CHANGED
|
@@ -41,7 +41,7 @@ function n2u(s) {
|
|
|
41
41
|
|
|
42
42
|
*/
|
|
43
43
|
function und(s,r) {
|
|
44
|
-
return '(y='+s+',typeof y=="undefined"?undefined:'+r+')'
|
|
44
|
+
return '(y='+s+',typeof y=="undefined"?undefined:'+r+')';
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
|
|
@@ -50,14 +50,14 @@ function und(s,r) {
|
|
|
50
50
|
@function
|
|
51
51
|
@return {boolean} Always true
|
|
52
52
|
*/
|
|
53
|
-
function returnTrue () {return true}
|
|
53
|
+
function returnTrue () {return true;}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
Return undefined. Stub for non-ecisting WHERE clause, because is faster then if(whenrfn) whenfn()
|
|
57
57
|
@function
|
|
58
58
|
@return {undefined} Always undefined
|
|
59
59
|
*/
|
|
60
|
-
function returnUndefined() {}
|
|
60
|
+
function returnUndefined() {}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
Escape quotes
|
|
@@ -72,7 +72,7 @@ function returnUndefined() {};
|
|
|
72
72
|
var escapeq = utils.escapeq = function(s) {
|
|
73
73
|
// console.log(s);
|
|
74
74
|
return s.replace(/\'/g,'\\\'');
|
|
75
|
-
}
|
|
75
|
+
};
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -87,7 +87,7 @@ var escapeq = utils.escapeq = function(s) {
|
|
|
87
87
|
*/
|
|
88
88
|
var escapeqq = utils.undoubleq = function(s) {
|
|
89
89
|
return s.replace(/(\')/g,'\'\'');
|
|
90
|
-
}
|
|
90
|
+
};
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
Replace double quotes with single quote
|
|
@@ -100,7 +100,7 @@ var escapeqq = utils.undoubleq = function(s) {
|
|
|
100
100
|
*/
|
|
101
101
|
var doubleq = utils.doubleq = function(s) {
|
|
102
102
|
return s.replace(/(\'\')/g,'\\\'');
|
|
103
|
-
}
|
|
103
|
+
};
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
/**
|
|
@@ -113,7 +113,7 @@ var doubleq = utils.doubleq = function(s) {
|
|
|
113
113
|
*/
|
|
114
114
|
var doubleqq = utils.doubleqq = function(s) {
|
|
115
115
|
return s.replace(/\'/g,"\'");
|
|
116
|
-
}
|
|
116
|
+
};
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
119
|
Cut BOM first character for UTF-8 files (for merging two files)
|
|
@@ -140,12 +140,13 @@ var loadFile = utils.loadFile = function(path, asy, success, error) {
|
|
|
140
140
|
|
|
141
141
|
if((typeof exports == 'object') || (typeof Meteor != 'undefined' && Meteor.isServer)) {
|
|
142
142
|
|
|
143
|
+
var fs;
|
|
143
144
|
if(typeof Meteor != 'undefined') {
|
|
144
145
|
/** For Meteor */
|
|
145
|
-
|
|
146
|
+
fs = Npm.require('fs');
|
|
146
147
|
} else {
|
|
147
148
|
/** For Node.js */
|
|
148
|
-
|
|
149
|
+
fs = require('fs');
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
/* If path is empty, than read data from stdin (for Node) */
|
|
@@ -224,7 +225,7 @@ var loadFile = utils.loadFile = function(path, asy, success, error) {
|
|
|
224
225
|
SELECT * FROM TXT('#one') -- read data from HTML element with id="one"
|
|
225
226
|
*/
|
|
226
227
|
if((path.substr(0,1) == '#') && (typeof document != 'undefined')) {
|
|
227
|
-
|
|
228
|
+
data = document.querySelector(path).textContent;
|
|
228
229
|
success(data);
|
|
229
230
|
} else {
|
|
230
231
|
/*
|
|
@@ -296,14 +297,14 @@ var loadBinaryFile = utils.loadBinaryFile = function(path, asy, success, error)
|
|
|
296
297
|
if(err) {
|
|
297
298
|
throw err;
|
|
298
299
|
}
|
|
299
|
-
var arr =
|
|
300
|
+
var arr = [];
|
|
300
301
|
for(var i = 0; i != data.length; ++i) arr[i] = String.fromCharCode(data[i]);
|
|
301
302
|
success(arr.join(""));
|
|
302
303
|
});
|
|
303
304
|
|
|
304
305
|
} else {
|
|
305
306
|
var data = fs.readFileSync(path);
|
|
306
|
-
var arr =
|
|
307
|
+
var arr = [];
|
|
307
308
|
for(var i = 0; i != data.length; ++i) arr[i] = String.fromCharCode(data[i]);
|
|
308
309
|
success(arr.join(""));
|
|
309
310
|
}
|
|
@@ -333,7 +334,7 @@ var loadBinaryFile = utils.loadBinaryFile = function(path, asy, success, error)
|
|
|
333
334
|
};
|
|
334
335
|
reader.readAsBinaryString(files[0]);
|
|
335
336
|
}
|
|
336
|
-
}
|
|
337
|
+
}
|
|
337
338
|
};
|
|
338
339
|
|
|
339
340
|
|
|
@@ -352,7 +353,7 @@ var removeFile = utils.removeFile = function(path,cb) {
|
|
|
352
353
|
});
|
|
353
354
|
} else {
|
|
354
355
|
throw new Error('You can remove files only in Node.js and Apache Cordova');
|
|
355
|
-
}
|
|
356
|
+
}
|
|
356
357
|
};
|
|
357
358
|
|
|
358
359
|
|
|
@@ -360,7 +361,7 @@ var deleteFile = utils.deleteFile = function(path,cb){
|
|
|
360
361
|
if(typeof exports == 'object') {
|
|
361
362
|
var fs = require('fs');
|
|
362
363
|
fs.unlink(path, cb);
|
|
363
|
-
}
|
|
364
|
+
}
|
|
364
365
|
};
|
|
365
366
|
|
|
366
367
|
var fileExists = utils.fileExists = function(path,cb){
|
|
@@ -423,7 +424,7 @@ var saveFile = utils.saveFile = function(path, data, cb) {
|
|
|
423
424
|
if(typeof exports == 'object') {
|
|
424
425
|
// For Node.js
|
|
425
426
|
var fs = require('fs');
|
|
426
|
-
|
|
427
|
+
data = fs.writeFileSync(path,data);
|
|
427
428
|
if(cb) res = cb(res);
|
|
428
429
|
} else if(typeof cordova == 'object') {
|
|
429
430
|
// For Apache Cordova
|
|
@@ -518,7 +519,7 @@ var saveFile = utils.saveFile = function(path, data, cb) {
|
|
|
518
519
|
if(cb) res = cb(res);
|
|
519
520
|
}
|
|
520
521
|
}
|
|
521
|
-
}
|
|
522
|
+
}
|
|
522
523
|
|
|
523
524
|
return res;
|
|
524
525
|
};
|
|
@@ -558,11 +559,15 @@ function isIE () {
|
|
|
558
559
|
|
|
559
560
|
var hash = utils.hash = function hash(str){
|
|
560
561
|
var h = 0;
|
|
561
|
-
|
|
562
|
+
|
|
563
|
+
if (0 === str.length)
|
|
564
|
+
return h;
|
|
565
|
+
|
|
562
566
|
for (var i = 0; i < str.length; i++) {
|
|
563
567
|
h = ((h<<5)-h)+str.charCodeAt(i);
|
|
564
568
|
h = h & h;
|
|
565
569
|
}
|
|
570
|
+
|
|
566
571
|
return h;
|
|
567
572
|
};
|
|
568
573
|
|
|
@@ -670,18 +675,18 @@ var arrayIntersectDeep = utils.arrayIntersectDeep = function(a,b) {
|
|
|
670
675
|
Deep clone obects
|
|
671
676
|
*/
|
|
672
677
|
var cloneDeep = utils.cloneDeep = function cloneDeep(obj) {
|
|
673
|
-
if(
|
|
678
|
+
if(null === obj || typeof(obj) != 'object')
|
|
674
679
|
return obj;
|
|
675
680
|
|
|
676
|
-
var temp = obj.constructor(); // changed
|
|
681
|
+
var temp = (Object.prototype.hasOwnProperty.call(obj, 'constructor') ? Object : obj.constructor)(); // changed
|
|
677
682
|
|
|
678
683
|
for(var key in obj) {
|
|
679
684
|
if(obj.hasOwnProperty(key)) {
|
|
680
|
-
temp[key] = cloneDeep(obj[key]);
|
|
685
|
+
/* 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]); }
|
|
681
686
|
}
|
|
682
687
|
}
|
|
683
688
|
return temp;
|
|
684
|
-
}
|
|
689
|
+
};
|
|
685
690
|
|
|
686
691
|
/**
|
|
687
692
|
Check equality of objects
|
|
@@ -727,7 +732,7 @@ var equalDeep = utils.equalDeep = function equalDeep (x, y, deep) {
|
|
|
727
732
|
COmpare two object in deep
|
|
728
733
|
*/
|
|
729
734
|
var deepEqual = utils.deepEqual = function (x, y) {
|
|
730
|
-
if ((typeof x == "object" &&
|
|
735
|
+
if ((typeof x == "object" && null !== x) && (typeof y == "object" && null !== y)) {
|
|
731
736
|
if (Object.keys(x).length != Object.keys(y).length)
|
|
732
737
|
return false;
|
|
733
738
|
|
|
@@ -747,7 +752,7 @@ var deepEqual = utils.deepEqual = function (x, y) {
|
|
|
747
752
|
return false;
|
|
748
753
|
else
|
|
749
754
|
return true;
|
|
750
|
-
}
|
|
755
|
+
};
|
|
751
756
|
|
|
752
757
|
|
|
753
758
|
/**
|
|
@@ -759,17 +764,18 @@ var distinctArray = utils.distinctArray = function(data) {
|
|
|
759
764
|
var uniq = {};
|
|
760
765
|
// TODO: Speedup, because Object.keys is slow
|
|
761
766
|
for(var i=0,ilen=data.length;i<ilen;i++) {
|
|
767
|
+
var uix;
|
|
762
768
|
if(typeof data[i] == 'object') {
|
|
763
|
-
|
|
769
|
+
uix = Object.keys(data[i]).sort().map(function(k){return k+'`'+data[i][k]}).join('`');
|
|
764
770
|
} else {
|
|
765
|
-
|
|
771
|
+
uix = data[i];
|
|
766
772
|
}
|
|
767
773
|
uniq[uix] = data[i];
|
|
768
|
-
}
|
|
774
|
+
}
|
|
769
775
|
var res = [];
|
|
770
776
|
for(var key in uniq) res.push(uniq[key]);
|
|
771
777
|
return res;
|
|
772
|
-
}
|
|
778
|
+
};
|
|
773
779
|
|
|
774
780
|
|
|
775
781
|
/**
|
|
@@ -783,27 +789,27 @@ var extend = utils.extend = function extend (a,b){
|
|
|
783
789
|
if(typeof a == 'undefined') a = {};
|
|
784
790
|
for(var key in b) {
|
|
785
791
|
if(b.hasOwnProperty(key)) {
|
|
786
|
-
a[key] = b[key]
|
|
792
|
+
/* 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]; }
|
|
787
793
|
}
|
|
788
794
|
}
|
|
789
795
|
return a;
|
|
790
|
-
}
|
|
796
|
+
};
|
|
791
797
|
|
|
792
798
|
/**
|
|
793
799
|
Flat array by first row
|
|
794
800
|
*/
|
|
795
801
|
var flatArray = utils.flatArray = function(a) {
|
|
796
802
|
//console.log(684,a);
|
|
797
|
-
if(!a || a.length
|
|
803
|
+
if(!a || 0 === a.length) return [];
|
|
798
804
|
|
|
799
805
|
// For recordsets
|
|
800
806
|
if(typeof a == 'object' && a instanceof alasql.Recordset) {
|
|
801
|
-
return a.data.map(function(ai){return ai[a.columns[0].columnid]});
|
|
807
|
+
return a.data.map(function(ai){return ai[a.columns[0].columnid];});
|
|
802
808
|
}
|
|
803
809
|
// Else for other arrays
|
|
804
810
|
var key = Object.keys(a[0])[0];
|
|
805
811
|
if(typeof key == 'undefined') return [];
|
|
806
|
-
return a.map(function(ai) {return ai[key]});
|
|
812
|
+
return a.map(function(ai) {return ai[key];});
|
|
807
813
|
};
|
|
808
814
|
|
|
809
815
|
/**
|
|
@@ -831,8 +837,8 @@ var xlsnc = utils.xlsnc = function(i) {
|
|
|
831
837
|
if(i>26) {
|
|
832
838
|
i=((i/26)|0)-1;
|
|
833
839
|
addr = String.fromCharCode(65+i%26)+addr;
|
|
834
|
-
}
|
|
835
|
-
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
836
842
|
return addr;
|
|
837
843
|
};
|
|
838
844
|
|
|
@@ -857,7 +863,8 @@ var domEmptyChildren = utils.domEmptyChildren = function (container){
|
|
|
857
863
|
var len = container.childNodes.length;
|
|
858
864
|
while (len--) {
|
|
859
865
|
container.removeChild(container.lastChild);
|
|
860
|
-
}
|
|
866
|
+
}
|
|
861
867
|
};
|
|
862
868
|
|
|
863
869
|
|
|
870
|
+
|
package/src/38query.js
CHANGED
|
@@ -63,13 +63,12 @@ function queryfn(query,oldscope,cb, A,B) {
|
|
|
63
63
|
source.query = query;
|
|
64
64
|
var rs = source.datafn(query, query.params, queryfn2, idx, alasql);
|
|
65
65
|
// console.log(333,rs);
|
|
66
|
-
if(typeof rs
|
|
66
|
+
if(typeof rs !== undefined) {
|
|
67
67
|
// TODO - this is a hack: check if result is array - check all cases and
|
|
68
68
|
// make it more logical
|
|
69
69
|
if((query.intofn || query.intoallfn) && rs instanceof Array) rs = rs.length;
|
|
70
70
|
result = rs;
|
|
71
71
|
}
|
|
72
|
-
// console.log(444,result);
|
|
73
72
|
//
|
|
74
73
|
// Ugly hack to use in query.wherefn and source.srcwherefns functions
|
|
75
74
|
// constructions like this.queriesdata['test'].
|
|
@@ -78,12 +77,13 @@ function queryfn(query,oldscope,cb, A,B) {
|
|
|
78
77
|
//
|
|
79
78
|
source.queriesdata = query.queriesdata;
|
|
80
79
|
});
|
|
81
|
-
if(
|
|
80
|
+
if(0 === slen)
|
|
81
|
+
result = queryfn3(query);
|
|
82
|
+
|
|
82
83
|
return result;
|
|
83
|
-
}
|
|
84
|
+
}
|
|
84
85
|
|
|
85
86
|
function queryfn2(data,idx,query) {
|
|
86
|
-
|
|
87
87
|
//console.log(56,arguments);
|
|
88
88
|
// console.log(78,data, idx,query);
|
|
89
89
|
//console.trace();
|
|
@@ -113,7 +113,7 @@ function queryfn2(data,idx,query) {
|
|
|
113
113
|
if(query.sourceslen>0) return;
|
|
114
114
|
|
|
115
115
|
return queryfn3(query);
|
|
116
|
-
}
|
|
116
|
+
}
|
|
117
117
|
|
|
118
118
|
function queryfn3(query) {
|
|
119
119
|
//console.log(55,query);
|
|
@@ -149,7 +149,7 @@ function queryfn3(query) {
|
|
|
149
149
|
// console.log(query.havingfns);
|
|
150
150
|
if(query.groupfn) {
|
|
151
151
|
query.data = [];
|
|
152
|
-
if(query.groups.length
|
|
152
|
+
if(0 === query.groups.length) {
|
|
153
153
|
var g = {};
|
|
154
154
|
if(query.selectGroup.length>0) {
|
|
155
155
|
// console.log(query.selectGroup);
|
|
@@ -160,10 +160,10 @@ function queryfn3(query) {
|
|
|
160
160
|
g[sg.nick] = undefined;
|
|
161
161
|
}
|
|
162
162
|
});
|
|
163
|
-
}
|
|
163
|
+
}
|
|
164
164
|
query.groups = [g];
|
|
165
165
|
// console.log();
|
|
166
|
-
}
|
|
166
|
+
}
|
|
167
167
|
// console.log('EMPTY',query.groups);
|
|
168
168
|
// debugger;
|
|
169
169
|
// if(false && (query.groups.length == 1) && (Object.keys(query.groups[0]).length == 0)) {
|
|
@@ -171,33 +171,33 @@ function queryfn3(query) {
|
|
|
171
171
|
// } else {
|
|
172
172
|
for(var i=0,ilen=query.groups.length;i<ilen;i++) {
|
|
173
173
|
// console.log(query.groups[i]);
|
|
174
|
-
|
|
174
|
+
g = query.groups[i];
|
|
175
175
|
if((!query.havingfn) || query.havingfn(g,query.params,alasql)) {
|
|
176
176
|
// console.log(g);
|
|
177
177
|
var d = query.selectgfn(g,query.params,alasql);
|
|
178
178
|
query.data.push(d);
|
|
179
|
-
}
|
|
179
|
+
}
|
|
180
180
|
};
|
|
181
181
|
// }
|
|
182
182
|
|
|
183
183
|
// query.groups = query.groups.filter();
|
|
184
|
-
}
|
|
185
|
-
|
|
184
|
+
}
|
|
186
185
|
// Remove distinct values
|
|
187
|
-
doDistinct(query);
|
|
188
|
-
|
|
186
|
+
doDistinct(query);
|
|
189
187
|
|
|
190
188
|
// UNION / UNION ALL
|
|
191
189
|
if(query.unionallfn) {
|
|
192
190
|
// TODO Simplify this part of program
|
|
191
|
+
var ud, nd;
|
|
193
192
|
if(query.corresponding) {
|
|
194
193
|
if(!query.unionallfn.query.modifier) query.unionallfn.query.modifier = undefined;
|
|
195
|
-
|
|
194
|
+
ud = query.unionallfn(query.params);
|
|
196
195
|
} else {
|
|
197
196
|
if(!query.unionallfn.query.modifier) query.unionallfn.query.modifier = 'RECORDSET';
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
nd = query.unionallfn(query.params);
|
|
198
|
+
ud = [];
|
|
199
|
+
ilen=nd.data.length
|
|
200
|
+
for(var i=0;i<ilen;i++) {
|
|
201
201
|
var r = {};
|
|
202
202
|
for(var j=0,jlen=Math.min(query.columns.length,nd.columns.length);j<jlen;j++) {
|
|
203
203
|
r[query.columns[j].columnid] = nd.data[i][nd.columns[j].columnid];
|
|
@@ -210,14 +210,16 @@ function queryfn3(query) {
|
|
|
210
210
|
|
|
211
211
|
if(query.corresponding) {
|
|
212
212
|
if(!query.unionfn.query.modifier) query.unionfn.query.modifier = 'ARRAY';
|
|
213
|
-
|
|
213
|
+
ud = query.unionfn(query.params);
|
|
214
214
|
} else {
|
|
215
215
|
if(!query.unionfn.query.modifier) query.unionfn.query.modifier = 'RECORDSET';
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
216
|
+
nd = query.unionfn(query.params);
|
|
217
|
+
ud = [];
|
|
218
|
+
ilen=nd.data.length
|
|
219
|
+
for(var i=0;i<ilen;i++) {
|
|
220
|
+
r = {};
|
|
221
|
+
jlen=Math.min(query.columns.length,nd.columns.length);
|
|
222
|
+
for(var j=0;j<jlen;j++) {
|
|
221
223
|
r[query.columns[j].columnid] = nd.data[i][nd.columns[j].columnid];
|
|
222
224
|
}
|
|
223
225
|
ud.push(r);
|
|
@@ -244,6 +246,7 @@ function queryfn3(query) {
|
|
|
244
246
|
}
|
|
245
247
|
|
|
246
248
|
|
|
249
|
+
|
|
247
250
|
query.data = arrayExceptDeep(query.data, ud);
|
|
248
251
|
} else if(query.intersectfn) {
|
|
249
252
|
if(query.corresponding) {
|
package/src/424select.js
CHANGED
|
@@ -64,7 +64,7 @@ function compileSelectStar (query,alias) {
|
|
|
64
64
|
// console.log(60,alias,columns);
|
|
65
65
|
|
|
66
66
|
// if column not exists, then copy all
|
|
67
|
-
sp += 'var w=p["'+alias+'"];for(var k in w){r[k]=w[k]};';
|
|
67
|
+
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]};';
|
|
68
68
|
//console.log(777, sp);
|
|
69
69
|
query.dirtyColumns = true;
|
|
70
70
|
}
|
|
@@ -287,7 +287,7 @@ yy.Select.prototype.compileSelectGroup1 = function(query) {
|
|
|
287
287
|
self.columns.forEach(function(col,idx){
|
|
288
288
|
// console.log(col);
|
|
289
289
|
if(col instanceof yy.Column && col.columnid == '*') {
|
|
290
|
-
// s += 'for(var k in g){r[k]=g[k]};';
|
|
290
|
+
// s += 'for(var k in g){if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=g[k]};';
|
|
291
291
|
s += 'for(var k in this.query.groupColumns){r[k]=g[this.query.groupColumns[k]]};';
|
|
292
292
|
// console.log(query);
|
|
293
293
|
} else {
|