@trenskow/pged
Advanced tools
Comparing version 5.1.20 to 5.1.21
{ | ||
"name": "@trenskow/pged", | ||
"version": "5.1.20", | ||
"version": "5.1.21", | ||
"description": "Just a silly little db management and query builder for PostgreSQL.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -401,2 +401,11 @@ import caseit from '@trenskow/caseit'; | ||
} else { | ||
if (value == null || typeof value === 'undefined') { | ||
if (comparer === '$eq') { | ||
return `${this._dbCase(key.substring(1), true)} is null`; | ||
} else if (comparer === '$neq' || comparer === '$ne') { | ||
return `${this._dbCase(key.substring(1), true)} is not null`; | ||
} else { | ||
throw new TypeError(`Comparer ${comparer} is not usable with \`null\` values.`); | ||
} | ||
} | ||
this._queryParameters.push(this._formatParameter(key, condition[key])); | ||
@@ -403,0 +412,0 @@ value = `$${this._queryParameters.length}`; |
29125
840