@inflector/optima 1.0.17 → 1.0.18
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 +6 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -421,7 +421,7 @@ var escape = (val) => {
|
|
|
421
421
|
return String(val);
|
|
422
422
|
};
|
|
423
423
|
var SQL_GENERATORS = {
|
|
424
|
-
eq: (c, v) => `${c} = ${escape(v)}`,
|
|
424
|
+
eq: (c, v) => v === null ? `${c} IS NULL` : `${c} = ${escape(v)}`,
|
|
425
425
|
ne: (c, v) => `${c} != ${escape(v)}`,
|
|
426
426
|
gt: (c, v) => `${c} > ${escape(v)}`,
|
|
427
427
|
gte: (c, v) => `${c} >= ${escape(v)}`,
|
|
@@ -476,7 +476,11 @@ var OptimaTable = class _OptimaTable {
|
|
|
476
476
|
} else if (val && typeof val === "object" && !Array.isArray(val) && !(val instanceof Date)) {
|
|
477
477
|
processLevel(val, colName);
|
|
478
478
|
} else {
|
|
479
|
-
|
|
479
|
+
if (val === null) {
|
|
480
|
+
conditions.push(SQL_GENERATORS.is(colName, null));
|
|
481
|
+
} else {
|
|
482
|
+
conditions.push(SQL_GENERATORS.eq(colName, val));
|
|
483
|
+
}
|
|
480
484
|
}
|
|
481
485
|
}
|
|
482
486
|
};
|