Dexie.js
Dexie.js copied to clipboard
Order by calculated value
Is it possible to order items by calculated value? For example: if I have a list of points and I would like to get the closest points to my location. I could calculate the distance with a simple formula: Math.hypot(endX - startX, endY - startY)
.
Is it possible to use this with built-in functions and then use this value for a sort?
The only option is to query the entire result and do the sorting in your app or library.