alasql 0.0.51 → 0.0.52
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/alasql.js +8 -8
- package/console/alasql.js +8 -8
- package/console/alasql.min.js +3 -3
- package/dist/alasql-worker.js +1 -1
- package/dist/alasql.js +8 -8
- package/dist/alasql.min.js +3 -3
- package/package.json +1 -1
- package/src/05copyright.js +1 -1
- package/src/10start.js +1 -1
- package/src/15utility.js +3 -3
- package/src/424select.js +2 -2
- package/src/70insert.js +1 -1
package/dist/alasql-worker.js
CHANGED
package/dist/alasql.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// alasql.js
|
|
3
3
|
// AlaSQL - JavaScript SQL database
|
|
4
4
|
// Date: 22.04.2015
|
|
5
|
-
// Version: 0.0.
|
|
5
|
+
// Version: 0.0.52
|
|
6
6
|
// (ñ) 2014-2015, Andrey Gershun
|
|
7
7
|
//
|
|
8
8
|
|
|
@@ -111,7 +111,7 @@ var alasql = function(sql, params, cb, scope) {
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
/** Current version of alasql */
|
|
114
|
-
alasql.version = "0.0.
|
|
114
|
+
alasql.version = "0.0.52";
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
|
|
@@ -3028,11 +3028,11 @@ var cloneDeep = utils.cloneDeep = function cloneDeep(obj) {
|
|
|
3028
3028
|
if(obj == null || typeof(obj) != 'object')
|
|
3029
3029
|
return obj;
|
|
3030
3030
|
|
|
3031
|
-
var temp = obj.constructor(); // changed
|
|
3031
|
+
var temp = (Object.prototype.hasOwnProperty.call(obj, 'constructor') ? Object : obj.constructor)(); // changed
|
|
3032
3032
|
|
|
3033
3033
|
for(var key in obj) {
|
|
3034
3034
|
if(obj.hasOwnProperty(key)) {
|
|
3035
|
-
temp[key] = cloneDeep(obj[key]);
|
|
3035
|
+
/* 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]); }
|
|
3036
3036
|
}
|
|
3037
3037
|
}
|
|
3038
3038
|
return temp;
|
|
@@ -3112,7 +3112,7 @@ var extend = utils.extend = function extend (a,b){
|
|
|
3112
3112
|
if(typeof a == 'undefined') a = {};
|
|
3113
3113
|
for(var key in b) {
|
|
3114
3114
|
if(b.hasOwnProperty(key)) {
|
|
3115
|
-
a[key] = b[key]
|
|
3115
|
+
/* 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]; }
|
|
3116
3116
|
}
|
|
3117
3117
|
}
|
|
3118
3118
|
return a;
|
|
@@ -6443,7 +6443,7 @@ function compileSelectStar (query,alias) {
|
|
|
6443
6443
|
// console.log(60,alias,columns);
|
|
6444
6444
|
|
|
6445
6445
|
// if column not exists, then copy all
|
|
6446
|
-
sp += 'var w=p["'+alias+'"];for(var k in w){r[k]=w[k]};';
|
|
6446
|
+
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]};';
|
|
6447
6447
|
//console.log(777, sp);
|
|
6448
6448
|
query.dirtyColumns = true;
|
|
6449
6449
|
}
|
|
@@ -6616,7 +6616,7 @@ yy.Select.prototype.compileSelectGroup1 = function(query) {
|
|
|
6616
6616
|
self.columns.forEach(function(col,idx){
|
|
6617
6617
|
// console.log(col);
|
|
6618
6618
|
if(col instanceof yy.Column && col.columnid == '*') {
|
|
6619
|
-
// s += 'for(var k in g){r[k]=g[k]};';
|
|
6619
|
+
// s += 'for(var k in g){if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=g[k]};';
|
|
6620
6620
|
s += 'for(var k in this.query.groupColumns){r[k]=g[this.query.groupColumns[k]]};';
|
|
6621
6621
|
// console.log(query);
|
|
6622
6622
|
} else {
|
|
@@ -9538,7 +9538,7 @@ yy.Insert.prototype.compile = function (databaseid) {
|
|
|
9538
9538
|
});
|
|
9539
9539
|
} else {
|
|
9540
9540
|
// console.log(222,values);
|
|
9541
|
-
// sw = 'var w='+JSONtoJavaScript(values)+';for(var k in w){r[k]=w[k]};';
|
|
9541
|
+
// sw = 'var w='+JSONtoJavaScript(values)+';for(var k in w){if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=w[k]};';
|
|
9542
9542
|
sw = JSONtoJavaScript(values);
|
|
9543
9543
|
}
|
|
9544
9544
|
}
|