Comparing version 0.0.25 to 0.0.26
@@ -93,4 +93,4 @@ exports.build = function (Dialect, where) { | ||
switch (op) { | ||
case "eq" : op = "="; break; | ||
case "ne" : op = "<>"; break; | ||
case "eq" : op = (where.w[k].val === null ? "IS" : "="); break; | ||
case "ne" : op = (where.w[k].val === null ? "IS NOT" : "<>"); break; | ||
case "gt" : op = ">"; break; | ||
@@ -97,0 +97,0 @@ case "gte" : op = ">="; break; |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.0.25", | ||
"version": "0.0.26", | ||
"license": "MIT", | ||
@@ -12,0 +12,0 @@ "repository": { |
@@ -30,2 +30,12 @@ var common = require('../common'); | ||
assert.equal( | ||
common.Select().from('table1').where({ col: common.Query.eq(null) }).build(), | ||
"SELECT * FROM `table1` WHERE `col` IS NULL" | ||
); | ||
assert.equal( | ||
common.Select().from('table1').where({ col: common.Query.ne(null) }).build(), | ||
"SELECT * FROM `table1` WHERE `col` IS NOT NULL" | ||
); | ||
assert.equal( | ||
common.Select().from('table1').where({ col: undefined }).build(), | ||
@@ -32,0 +42,0 @@ "SELECT * FROM `table1` WHERE `col` IS NULL" |
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
36075
1245