@singlestore/client
Advanced tools
Comparing version 0.0.42 to 0.0.43
@@ -683,2 +683,3 @@ "use strict"; | ||
for (const [column, value] of Object.entries(clauses)) { | ||
if (value === void 0) continue; | ||
if (column === "OR" && Array.isArray(value)) { | ||
@@ -688,4 +689,5 @@ _clauses.push(`(${value.map((v) => `(${this.buildWhereClause(v, joinClauses)})`).join(" OR ")})`); | ||
_clauses.push(`NOT (${this.buildWhereClause(value, joinClauses)})`); | ||
} else if (typeof value === "object" && !Array.isArray(value)) { | ||
} else if (typeof value === "object" && value !== null && !Array.isArray(value)) { | ||
for (const [operator, _value] of Object.entries(value)) { | ||
if (_value === void 0) continue; | ||
const _column = joinClauses?.length ? isJoinColumn(column, joinClauses) ? column : `${this._tableName}.${column}` : column; | ||
@@ -699,2 +701,3 @@ _clauses.push(this.buildWhereCondition(_column, operator, _value)); | ||
} | ||
if (!_clauses.length) return ""; | ||
return `WHERE ${_clauses.join(" AND ")}`; | ||
@@ -701,0 +704,0 @@ } |
{ | ||
"name": "@singlestore/client", | ||
"version": "0.0.42", | ||
"version": "0.0.43", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
541831
4092