Comparing version 0.1.4 to 0.1.5
@@ -27,9 +27,19 @@ exports.build = function (Dialect, where) { | ||
if (where.e) { | ||
// EXISTS | ||
// EXISTS | ||
wheres = []; | ||
if(Array.isArray(where.e.l[0]) && Array.isArray(where.e.l[1])) { | ||
for (i = 0; i < where.e.l[0].length; i++) { | ||
wheres.push(Dialect.escapeId(where.e.l[0][i]) + " = " + Dialect.escapeId(where.e.tl, where.e.l[1][i])); | ||
} | ||
} else { | ||
wheres.push(Dialect.escapeId(where.e.l[0]) + " = " + Dialect.escapeId(where.e.tl, where.e.l[1])); | ||
} | ||
return [ | ||
"EXISTS (" + | ||
"SELECT * FROM " + Dialect.escapeId(where.e.t) + " " + | ||
"WHERE " + Dialect.escapeId(where.e.l[0]) + " = " + Dialect.escapeId(where.e.tl, where.e.l[1]) + " " + | ||
"WHERE " + wheres.join(" AND ") + " " + | ||
"AND " + buildOrGroup(Dialect, { t: null, w: where.w }) + | ||
")" | ||
")" | ||
]; | ||
@@ -36,0 +46,0 @@ } |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"license": "MIT", | ||
@@ -15,2 +15,5 @@ "repository": { | ||
}, | ||
"contributors": [ | ||
{ "name" : "Benjamin Pannell", "email" : "admin@sierrasoftworks.com" } | ||
], | ||
"scripts": { | ||
@@ -17,0 +20,0 @@ "test": "make" |
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
42549
35
1432