Completed
Last Updated: 17 Jun 2022 08:07 by ADMIN
Created by: Russell
Comments: 4
Category: DataQuery
Type: Feature Request
0

Please export the operatorsMap from Data Query's filter-no-eval.js.

If exporting the operators map is not an option, consider introducing an enum which defines the operators as constants:

export enum Operators {
contains = 'contains',
doesnotcontain = 'doesnotcontain',
doesnotendwith = 'doesnotendwith',
doesnotstartwith = 'doesnotstartwith',
endswith = 'endswith',
eq = 'eq',
gt = 'gt',
gte = 'gte',
isempty = 'isempty',
isnotempty = 'isnotempty',
isnotnull = 'isnotnull',
isnull = 'isnull',
lt = 'lt',
lte = 'lte',
neq = 'neq',
startswith = 'startswith'
}

 

Completed
Last Updated: 07 May 2021 11:26 by Anthony
Created by: Anthony
Comments: 2
Category: DataQuery
Type: Feature Request
1

Hi,

I've just started to use the process method of the Data query library and there is no way of filtering a property that is an array, even as simple array such as Array<string>.

ie:

interface Person {

  id: string;

  name: string;

  categoryIds: Array<string>

}

I have many instances where I have properties that are arrays of string ids, so was hoping to use this utility to help filter the data.

Whilst adding an additional operator such as includes would help, how about adding the ability to register a custom operators?

Thanks,
Anthony.