ismx-nexo-node-app 0.4.66 → 0.4.68
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.
|
@@ -234,9 +234,12 @@ class RepositoryDatabasePostgres extends RepositoryDatabase_1.default {
|
|
|
234
234
|
alias += ".";
|
|
235
235
|
if (value instanceof Array)
|
|
236
236
|
where += ` AND ${alias}${column} = ANY(\$${iter++})`;
|
|
237
|
+
else if (value === null)
|
|
238
|
+
where += ` AND ${alias}${column} IS NULL`;
|
|
237
239
|
else
|
|
238
240
|
where += ` AND ${alias}${column}=\$${iter++}`;
|
|
239
|
-
|
|
241
|
+
if (value !== null)
|
|
242
|
+
values.push(value);
|
|
240
243
|
}
|
|
241
244
|
return { where, values };
|
|
242
245
|
}
|
|
@@ -55,7 +55,7 @@ export default class RepositoryDatabasePostgres extends RepositoryDatabase {
|
|
|
55
55
|
[key: string]: Primitive | Array<Primitive>;
|
|
56
56
|
}, alias?: string, index?: number): {
|
|
57
57
|
where: string;
|
|
58
|
-
values: (string | number | Date | Primitive[]
|
|
58
|
+
values: (string | number | Date | Primitive[])[];
|
|
59
59
|
};
|
|
60
60
|
private introspect;
|
|
61
61
|
}
|
package/package.json
CHANGED
|
@@ -204,8 +204,9 @@ export default class RepositoryDatabasePostgres extends RepositoryDatabase
|
|
|
204
204
|
if (value === undefined) continue;
|
|
205
205
|
if (alias !== "") alias += "."
|
|
206
206
|
if (value instanceof Array) where += ` AND ${alias}${column} = ANY(\$${iter++})`
|
|
207
|
+
else if (value === null) where += ` AND ${alias}${column} IS NULL`
|
|
207
208
|
else where += ` AND ${alias}${column}=\$${iter++}`
|
|
208
|
-
values.push(value);
|
|
209
|
+
if (value !== null) values.push(value);
|
|
209
210
|
}
|
|
210
211
|
|
|
211
212
|
return { where, values };
|