workers-qb 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -524,8 +524,9 @@ var QueryBuilder = class {
|
|
|
524
524
|
conditions = value.conditions;
|
|
525
525
|
}
|
|
526
526
|
if (typeof conditions === "string") return ` WHERE ${conditions.toString()}`;
|
|
527
|
-
if (conditions.length
|
|
528
|
-
|
|
527
|
+
if (conditions.length === 1) return ` WHERE ${conditions[0].toString()}`;
|
|
528
|
+
if (conditions.length > 1) {
|
|
529
|
+
return ` WHERE (${conditions.join(") AND (")})`;
|
|
529
530
|
}
|
|
530
531
|
return "";
|
|
531
532
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -484,8 +484,9 @@ var QueryBuilder = class {
|
|
|
484
484
|
conditions = value.conditions;
|
|
485
485
|
}
|
|
486
486
|
if (typeof conditions === "string") return ` WHERE ${conditions.toString()}`;
|
|
487
|
-
if (conditions.length
|
|
488
|
-
|
|
487
|
+
if (conditions.length === 1) return ` WHERE ${conditions[0].toString()}`;
|
|
488
|
+
if (conditions.length > 1) {
|
|
489
|
+
return ` WHERE (${conditions.join(") AND (")})`;
|
|
489
490
|
}
|
|
490
491
|
return "";
|
|
491
492
|
}
|