Browse Source

fix: Allow empty string in xwhere

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/341/head
Pranav C 3 years ago
parent
commit
7efc363380
  1. 2
      packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts

2
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]) {

Loading…
Cancel
Save