Browse Source

fix: add btw and nbtw filters (#2129)

Signed-off-by: Vijay Kumar Rathore <professional.vijay8492@gmail.com>
pull/2139/head
Vijay Rathore 2 years ago committed by GitHub
parent
commit
96e890c2d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      packages/nocodb/src/lib/dataMapper/lib/sql/conditionV2.ts
  2. 4
      packages/nocodb/src/lib/noco-models/Filter.ts

6
packages/nocodb/src/lib/dataMapper/lib/sql/conditionV2.ts

@ -284,6 +284,12 @@ const parseConditionV2 = async (
case 'notnull':
qb = qb.whereNotNull(customWhereClause || field);
break;
case 'btw':
qb = qb.whereBetween(field, val.split(','));
break;
case 'nbtw':
qb = qb.whereNotBetween(field, val.split(','));
break;
}
};
}

4
packages/nocodb/src/lib/noco-models/Filter.ts

@ -37,7 +37,9 @@ export default class Filter {
| 'le'
| 'in'
| 'isnot'
| 'is';
| 'is'
| 'btw'
| 'nbtw';
value?: string;
logical_op?: string;

Loading…
Cancel
Save