sails-disk
Advanced tools
Comparing version 0.10.9 to 0.10.10
@@ -501,3 +501,3 @@ /** | ||
this.data[collectionName] = _.reject(this.data[collectionName], function (model, i) { | ||
return _.contains(resultSet.indices, i); | ||
return _.includes(resultSet.indices, i); | ||
}); | ||
@@ -527,3 +527,3 @@ | ||
var attrDef = this.schema[collectionName][attrName]; | ||
// Only apply autoIncrement if we're supposed to! | ||
@@ -534,20 +534,20 @@ if(!attrDef.autoIncrement) continue; | ||
if(!this.counters[collectionName][attrName]) this.counters[collectionName][attrName] = 0; | ||
// If peeps are manually setting the AI field, keep the counter ahead. | ||
// Otherwise, increment the counter and set the field. | ||
if(values[attrName]) { | ||
if (values[attrName] > this.counters[collectionName][attrName]) { | ||
this.counters[collectionName][attrName] = values[attrName]; | ||
} | ||
} else { | ||
// Increment AI counter | ||
this.counters[collectionName][attrName]++; | ||
// Set data to current auto-increment value | ||
values[attrName] = this.counters[collectionName][attrName]; | ||
} | ||
} | ||
@@ -633,2 +633,7 @@ | ||
// Ignore uniqueness check on null values | ||
// null should be ignored in unique constraint following SQL:2011 standard | ||
// even so some DBMS (eg. Microsoft SQL Server) are not standard compliant | ||
if (_.isNull(values[attrName])) continue; | ||
// If `pkValueOfFirstRecordInResultSet` was provided, this must be an update, | ||
@@ -639,3 +644,3 @@ // and we're updating the record with this pk value. | ||
// uniqueness violation. | ||
// | ||
// | ||
// (note that if I'm updating multiple records but providing only one value for | ||
@@ -642,0 +647,0 @@ // a unique attribute, this will inevitably fail anyways-- this is why we only care |
{ | ||
"name": "sails-disk", | ||
"version": "0.10.9", | ||
"version": "0.10.10", | ||
"description": "Persistent local-disk adapter for Sails.js / Waterline", | ||
@@ -31,12 +31,12 @@ "main": "lib/adapter.js", | ||
"dependencies": { | ||
"lodash": "2.4.1", | ||
"waterline-criteria": "~1.0.0", | ||
"waterline-errors": "~0.10.0", | ||
"fs-extra": "0.8.1", | ||
"lodash": "3.10.1", | ||
"waterline-criteria": "~1.0.1", | ||
"waterline-errors": "~0.10.1", | ||
"fs-extra": "0.30.0", | ||
"async": "~0.2.9", | ||
"waterline-cursor": "~0.0.5" | ||
"waterline-cursor": "~0.0.6" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~1.13.0", | ||
"waterline-adapter-tests": "~0.10.0", | ||
"mocha": "~2.5.3", | ||
"waterline-adapter-tests": "~0.12.0", | ||
"captains-log": "~0.11.1" | ||
@@ -43,0 +43,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33082
906
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedfs-extra@0.30.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedjsonfile@2.4.0(transitive)
+ Addedklaw@1.3.1(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedfs-extra@0.8.1(transitive)
- Removedjsonfile@1.1.1(transitive)
- Removedlodash@2.4.1(transitive)
- Removedmkdirp@0.3.5(transitive)
- Removedncp@0.4.2(transitive)
- Removedrimraf@2.2.8(transitive)
Updatedfs-extra@0.30.0
Updatedlodash@3.10.1
Updatedwaterline-criteria@~1.0.1
Updatedwaterline-cursor@~0.0.6
Updatedwaterline-errors@~0.10.1