Comparing version 0.0.4 to 0.0.5
@@ -60,2 +60,5 @@ var Where = require("./Where"); | ||
for (var i = 0; i < arguments.length; i++) { | ||
if (arguments[i] === null) { | ||
continue; | ||
} | ||
if (typeof arguments[i] == "string") { | ||
@@ -74,3 +77,5 @@ where.push({ | ||
} | ||
sql.where.push(where); | ||
if (where.length > 0) { | ||
sql.where.push(where); | ||
} | ||
return this; | ||
@@ -77,0 +82,0 @@ }, |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"license": "MIT", | ||
@@ -12,0 +12,0 @@ "repository": { |
@@ -5,2 +5,12 @@ var common = require('../common'); | ||
assert.equal( | ||
common.Select().from('t1').where().build(), | ||
"SELECT * FROM `t1`" | ||
); | ||
assert.equal( | ||
common.Select().from('t1').where(null).build(), | ||
"SELECT * FROM `t1`" | ||
); | ||
assert.equal( | ||
common.Select().from('t1').where({ col: 1 }).build(), | ||
@@ -7,0 +17,0 @@ "SELECT * FROM `t1` WHERE (`col` = 1)" |
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
23741
855