Query builder support for collection types

Hi,

I have an entity that looks like this

 "id": "12345",
 "name": "Entity 12345",
 "startDate": "2019-02-03T00:00:00",
 "endDate": "2019-05-09T00:00:00",
 "cost": 1000000.00,
 "tags": [ "Tag1",  "Tag2" "Tag3" ]

As far as I understood from the documentation, Query Builder supports string, date, number and bool data types. Is it possible to support collections also? I'm using ODataV4Adaptor to access my server side data, and by default "tags" data type is considered as string, so the query generated is this: 

?$filter=startswith(tolower(tags),'Tag'

while what I'm expecting the query builed and the adaptor to generate is this: 

?$filter=tags/any(s:contains(s, 'Tag')) 

Thank you,
Andrii KAplanovskyi

1 Reply 1 reply marked as answer

MV Madhan Venkateshan Syncfusion Team June 24, 2020 04:28 PM UTC

Hi Andrii Kaplanovskyi, 
 
Thanks for your patience. 
 
We have provided the support for only string, number, Boolean and date type of values. Since, our data manager supports these types only. We have used ‘startswith’, ‘endswith’ and ‘contains’ operators only for string type of values. And we have provided support for JSON and SQL type of filters. So, this parsing is not feasible in our query builder. However, you can render the collection type of values using templates. And, you can manually change the rule as you requested by parsing the JSON or SQL. 
 
Regards, 
Madhan V 


Marked as answer
Loader.
Up arrow icon