Our endusers expect data returned by the Proton Node.js applications to be sorted. As a developer, I need to build scalable solutions that work with large datasets.
Currently the DQL search results returned by the domino-db module are not sorted. Sorting is up to the Node.js application which does not scale.
We need two options to let Domino sort the results:
-
by a fieldname ASC/DESC
The Proton task would search the database design to find a SELECT @All view that has a sorted view column containing the specified fieldname in the requested sort direction. The DQL results are returned in the order they appear in this column.
If no such column exists, the lookup results in an error (=> the Node.js app has to manually create an index on the field).
-
by a named view column ASC/DESC
The Proton task would return the DQL results in the order they appear in a view column.
Both sort options would support paging. So passing an start/count into the bulkReadDocuments methods would return a subset of the sorted data.
Karsten Lehmann, Mindoo GmbH
In plan - John Curtis
For LS/Java they already added this feature in R10:
ViewEntryCollection.intersect(DocumentCollection dc, boolean maintainOrder) with maintainOrder = true
Should not be a real problem to do the same in the Proton task and use the already existing design catalog to find, resort and use the right view.
Agree. This is a must-have for DQL.
By the way: I saw 'Sorted results' mentioned for 'beyond V11' in a presentation from HCL titled 'Domion App Dev'. Not sure if that includes paging.