alasql 0.1.10 → 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/console/alasql.min.js +3 -3
- package/dist/alasql-worker.js +1 -1
- package/dist/alasql.js +9 -9
- package/dist/alasql.min.js +3 -3
- package/package.json +1 -1
- package/src/05copyright.js +2 -2
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! AlaSQL v0.1.
|
|
1
|
+
/*! AlaSQL v0.1.11 (c) 2014-2015 Andrey Gershun | alasql.org/license */
|
|
2
2
|
/*
|
|
3
3
|
@module alasql
|
|
4
|
-
@version 0.1.
|
|
4
|
+
@version 0.1.11
|
|
5
5
|
|
|
6
6
|
AlaSQL - JavaScript SQL database
|
|
7
7
|
(ñ) 2014-2015, Andrey Gershun
|
|
@@ -126,7 +126,7 @@ var alasql = function alasql(sql, params, cb, scope) {
|
|
|
126
126
|
Current version of alasql
|
|
127
127
|
@constant {string}
|
|
128
128
|
*/
|
|
129
|
-
alasql.version = "0.1.
|
|
129
|
+
alasql.version = "0.1.11";
|
|
130
130
|
|
|
131
131
|
/**
|
|
132
132
|
Debug flag
|
|
@@ -3569,11 +3569,11 @@ var cloneDeep = utils.cloneDeep = function cloneDeep(obj) {
|
|
|
3569
3569
|
if(null === obj || typeof(obj) != 'object')
|
|
3570
3570
|
return obj;
|
|
3571
3571
|
|
|
3572
|
-
var temp = obj.constructor(); // changed
|
|
3572
|
+
var temp = (Object.prototype.hasOwnProperty.call(obj, 'constructor') ? Object : obj.constructor)(); // changed
|
|
3573
3573
|
|
|
3574
3574
|
for(var key in obj) {
|
|
3575
3575
|
if(obj.hasOwnProperty(key)) {
|
|
3576
|
-
temp[key] = cloneDeep(obj[key]);
|
|
3576
|
+
/* 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]); }
|
|
3577
3577
|
}
|
|
3578
3578
|
}
|
|
3579
3579
|
return temp;
|
|
@@ -3680,7 +3680,7 @@ var extend = utils.extend = function extend (a,b){
|
|
|
3680
3680
|
if(typeof a == 'undefined') a = {};
|
|
3681
3681
|
for(var key in b) {
|
|
3682
3682
|
if(b.hasOwnProperty(key)) {
|
|
3683
|
-
a[key] = b[key];
|
|
3683
|
+
/* 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]; }
|
|
3684
3684
|
}
|
|
3685
3685
|
}
|
|
3686
3686
|
return a;
|
|
@@ -8350,7 +8350,7 @@ function compileSelectStar (query,alias) {
|
|
|
8350
8350
|
// console.log(60,alias,columns);
|
|
8351
8351
|
|
|
8352
8352
|
// if column not exists, then copy all
|
|
8353
|
-
sp += 'var w=p["'+alias+'"];for(var k in w){r[k]=w[k]};';
|
|
8353
|
+
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]};';
|
|
8354
8354
|
//console.log(777, sp);
|
|
8355
8355
|
query.dirtyColumns = true;
|
|
8356
8356
|
}
|
|
@@ -8573,7 +8573,7 @@ yy.Select.prototype.compileSelectGroup1 = function(query) {
|
|
|
8573
8573
|
self.columns.forEach(function(col,idx){
|
|
8574
8574
|
// console.log(col);
|
|
8575
8575
|
if(col instanceof yy.Column && col.columnid == '*') {
|
|
8576
|
-
// s += 'for(var k in g){r[k]=g[k]};';
|
|
8576
|
+
// s += 'for(var k in g){if(/^__proto__$/.test(k))Object.defineProperty(r,k,{writable:true,enumerable:true,configurable:true});r[k]=g[k]};';
|
|
8577
8577
|
s += 'for(var k in this.query.groupColumns){r[k]=g[this.query.groupColumns[k]]};';
|
|
8578
8578
|
// console.log(query);
|
|
8579
8579
|
} else {
|
|
@@ -12281,7 +12281,7 @@ yy.Insert.prototype.compile = function (databaseid) {
|
|
|
12281
12281
|
});
|
|
12282
12282
|
} else {
|
|
12283
12283
|
// console.log(222,values);
|
|
12284
|
-
// sw = 'var w='+JSONtoJavaScript(values)+';for(var k in w){r[k]=w[k]};';
|
|
12284
|
+
// 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]};';
|
|
12285
12285
|
sw = JSONtoJavaScript(values);
|
|
12286
12286
|
}
|
|
12287
12287
|
}
|