backbone-sql
Advanced tools
Comparing version 0.5.7 to 0.5.8
@@ -92,8 +92,14 @@ // Generated by CoffeeScript 1.7.1 | ||
_appendConditionalWhere = function(query, key, condition, table, compound) { | ||
var whereMethod; | ||
whereMethod = compound ? 'andWhere' : 'where'; | ||
if (condition.operator === '!=') { | ||
return query[compound ? 'andWhere' : 'where'](function() { | ||
return this.where(_columnName(key, table), condition.operator, condition.value).orWhereNull(_columnName(key, table)); | ||
return query[whereMethod](function() { | ||
if (_.isNull(condition.value)) { | ||
return this.whereNotNull(_columnName(key, table)); | ||
} else { | ||
return this.where(_columnName(key, table), condition.operator, condition.value).orWhereNull(_columnName(key, table)); | ||
} | ||
}); | ||
} else { | ||
return query[compound ? 'andWhere' : 'where'](_columnName(key, table), condition.operator, condition.value); | ||
return query[whereMethod](_columnName(key, table), condition.operator, condition.value); | ||
} | ||
@@ -100,0 +106,0 @@ }; |
{ | ||
"name": "backbone-sql", | ||
"version": "0.5.7", | ||
"version": "0.5.8", | ||
"description": "PostgreSQL, MySQL, and SQLite3 storage for BackboneORM", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Please refer to the following release notes when upgrading your version of BackboneSQL. | ||
### 0.5.8 | ||
* Fix for $ne: null in find queries | ||
### 0.5.7 | ||
@@ -4,0 +7,0 @@ * Compatability fix for Backbone 1.1.1 |
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
121760
1263