Browse Source

fix: add btw and nbtw filters (#2129)

Signed-off-by: Vijay Kumar Rathore <professional.vijay8492@gmail.com>
feat/0523-export-schema
Vijay Rathore 3 years ago committed by Raju Udava
parent
commit
e46289e8a3
  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': case 'notnull':
qb = qb.whereNotNull(customWhereClause || field); qb = qb.whereNotNull(customWhereClause || field);
break; 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' | 'le'
| 'in' | 'in'
| 'isnot' | 'isnot'
| 'is'; | 'is'
| 'btw'
| 'nbtw';
value?: string; value?: string;
logical_op?: string; logical_op?: string;

Loading…
Cancel
Save