From 7efc363380e71a43e289eafd349f0c761f30d7f2 Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Fri, 2 Jul 2021 11:11:36 +0530 Subject: [PATCH] fix: Allow empty string in xwhere Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com> --- packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts b/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts index fc207ec36b..5400a537d8 100644 --- a/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts +++ b/packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts @@ -108,7 +108,7 @@ const appendWhereCondition = function (conditions, columnAliases: { break; } } else if (typeof condition === 'string') { - let matches = condition.match(/^(?:~(\w+))?\((\w+),(\w+),(.+?)\)(?:~(?:or|and|not))?$/) + let matches = condition.match(/^(?:~(\w+))?\((\w+),(\w+),(.*?)\)(?:~(?:or|and|not))?$/) if (!matches) throw new Error(`${condition} : not a valid syntax`) switch (matches[3]) {