wso2 / ballerina-vscode

To keep Ballerina VSCode plugin related issues, discussions, etc.
Apache License 2.0
41 stars 20 forks source link

[Data Mapper] Add support for collect clause in query expressions #525

Closed madushajg closed 1 month ago

madushajg commented 10 months ago

Description: collect clause is available from ballerina 2201.7.0[1].

Currently, the Data Mapper suggests to map with a query expressions only when both the source type and the target type are arrays. However with the collect clause, the query expressions can return a single value. Hence there is a possibility of suggesting to map with query expressions for array-to-int like cases too.

This issue is to track providing this support within the Data Mapper.

[1] https://ballerina.io/downloads/swan-lake-release-notes/swan-lake-2201.7.0#introduction-of-the-group-by-and-collect-clauses