Comparing version 0.43.0 to 0.43.1
@@ -15,9 +15,13 @@ 'use strict'; | ||
node.forEach(function (subNode) { | ||
if (!result) { | ||
result = subNode; | ||
} else { | ||
result = result.and(subNode); | ||
} | ||
}); | ||
if (node.length === 0) { | ||
result = new TextNode('(1 = 1)'); | ||
} else { | ||
node.forEach(function (subNode) { | ||
if (!result) { | ||
result = subNode; | ||
} else { | ||
result = result.and(subNode); | ||
} | ||
}); | ||
} | ||
} | ||
@@ -24,0 +28,0 @@ else if (!node.toNode && typeof node === 'object'){ |
@@ -5,3 +5,3 @@ { | ||
"description": "sql builder", | ||
"version": "0.43.0", | ||
"version": "0.43.1", | ||
"homepage": "https://github.com/brianc/node-sql", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -55,2 +55,19 @@ 'use strict'; | ||
params: [] | ||
}); | ||
Harness.test({ | ||
query: user.where([]), | ||
pg: { | ||
text : 'SELECT * FROM "user" WHERE (1 = 1)', | ||
string: 'SELECT * FROM "user" WHERE (1 = 1)' | ||
}, | ||
mysql: { | ||
text : 'SELECT * FROM `user` WHERE (1 = 1)', | ||
string: 'SELECT * FROM `user` WHERE (1 = 1)' | ||
}, | ||
sqlite: { | ||
text : 'SELECT * FROM "user" WHERE (1 = 1)', | ||
string: 'SELECT * FROM "user" WHERE (1 = 1)' | ||
}, | ||
params: [] | ||
}); |
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
294257
7905