Browse Source

fix: Accept column name with whitespace

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

2
packages/nocodb/src/lib/dataMapper/lib/sql/CustomKnex.ts

@ -109,7 +109,7 @@ const appendWhereCondition = function (conditions, columnAliases: {
break; break;
} }
} else if (typeof condition === 'string') { } else if (typeof condition === 'string') {
const matches = condition.match(/^(?:~(\w+))?\((\w+),(\w+),(.*?)\)(?:~(?:or|and|not))?$/) const matches = condition.match(/^(?:~(\w+))?\(([\w ]+),(\w+),(.*?)\)(?:~(?:or|and|not))?$/)
if (!matches) throw new Error(`${condition} : not a valid syntax`) if (!matches) throw new Error(`${condition} : not a valid syntax`)
switch (matches[3]) { switch (matches[3]) {

Loading…
Cancel
Save