Browse Source

add support to not in filters

Signed-off-by: Vijay Kumar Rathore <professional.vijay8492@gmail.com>
pull/2456/head
Vijay Kumar Rathore 2 years ago
parent
commit
09cd86d955
  1. 3
      packages/noco-docs/content/en/developer-resources/rest-apis.md
  2. 1
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts
  3. 1
      packages/nocodb/src/lib/models/Filter.ts

3
packages/noco-docs/content/en/developer-resources/rest-apis.md

@ -193,7 +193,8 @@ Currently, the default value for {orgs} is <b>noco</b>. Users will be able to ch
| Operation | Meaning | Example | | Operation | Meaning | Example |
|---|---|---| |---|---|---|
| eq | equal | (colName,eq,colValue) | | eq | equal | (colName,eq,colValue) |
| not | not equal | (colName,not,colValue) | | neq | not equal | (colName,neq,colValue) |
| not | not equal (alias of neq) | (colName,not,colValue) |
| gt | greater than | (colName,gt,colValue) | | gt | greater than | (colName,gt,colValue) |
| ge | greater or equal | (colName,ge,colValue) | | ge | greater or equal | (colName,ge,colValue) |
| lt | less than | (colName,lt,colValue) | | lt | less than | (colName,lt,colValue) |

1
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/conditionV2.ts

@ -216,6 +216,7 @@ const parseConditionV2 = async (
qb = qb.where(field, val); qb = qb.where(field, val);
break; break;
case 'neq': case 'neq':
case 'not':
qb = qb.whereNot(field, val); qb = qb.whereNot(field, val);
break; break;
case 'like': case 'like':

1
packages/nocodb/src/lib/models/Filter.ts

@ -23,6 +23,7 @@ export default class Filter {
comparison_op?: comparison_op?:
| 'eq' | 'eq'
| 'neq' | 'neq'
| 'not'
| 'like' | 'like'
| 'nlike' | 'nlike'
| 'empty' | 'empty'

Loading…
Cancel
Save