From 27fb235d201ae486bb507ed66b59ddb0637e8a83 Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Wed, 13 Nov 2019 19:07:42 -0800 Subject: [PATCH] IS NULL should check on value attribute --- lib/mongodb-functions.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/mongodb-functions.ts b/lib/mongodb-functions.ts index e3aaec0..788c0a3 100644 --- a/lib/mongodb-functions.ts +++ b/lib/mongodb-functions.ts @@ -51,7 +51,18 @@ export function processDeviceFilter(filter): Expression { else if (exp[0] === "<>" && exp[2] !== true) return ["=", ["PARAM", "_tags"], t]; } else if ( - ["=", "<>", ">", ">=", "<", "<=", "LIKE", "NOT LIKE"].includes(exp[0]) + [ + "=", + "<>", + ">", + ">=", + "<", + "<=", + "LIKE", + "NOT LIKE", + "IS NULL", + "IS NOT NULL" + ].includes(exp[0]) ) { let e = map(exp, ee => { if (