mongo filtersing fixes

This commit is contained in:
Jan Prochazka 2022-03-16 18:34:44 +01:00
parent 4a0bd14dfe
commit 61c5ac6a47
2 changed files with 17 additions and 0 deletions

View File

@ -92,6 +92,7 @@ const createParser = () => {
eq: r => word('=').then(r.value).map(operatorCondition('$eq')),
ne: r => word('!=').then(r.value).map(operatorCondition('$ne')),
ne2: r => word('<>').then(r.value).map(operatorCondition('$ne')),
lt: r => word('<').then(r.value).map(operatorCondition('$lt')),
gt: r => word('>').then(r.value).map(operatorCondition('$gt')),
le: r => word('<=').then(r.value).map(operatorCondition('$lte')),
@ -111,6 +112,7 @@ const createParser = () => {
r.false,
r.eq,
r.ne,
r.ne2,
r.lt,
r.gt,
r.le,

View File

@ -39,6 +39,21 @@
{ value: '<=', label: 'is before or equal' },
{ value: '>=', label: 'is after or equal' },
];
case 'mongo':
return [
{ value: '=', label: 'eqals' },
{ value: '<>', label: 'does not equal' },
{ value: '<', label: 'is smaller' },
{ value: '>', label: 'is greater' },
{ value: '<=', label: 'is smaller or equal' },
{ value: '>=', label: 'is greater or equal' },
{ value: '+', label: 'contains' },
{ value: '~', label: 'does not contain' },
{ value: '^', label: 'begins with' },
{ value: '!^', label: 'does not begin with' },
{ value: '$', label: 'ends with' },
{ value: '!$', label: 'does not end with' },
];
}
}
</script>