dfahlander/Dexie.js

Collection.orderBy()

dfahlander asked for this feature about 4 years ago — 1 comment

dfahlander commented about 4 years ago Admin

Today orderBy() is only available on Table. To sort a query result, the user is encouraged to use Collection.sortBy() instead. sortBy() is not lazily invoked, like orderBy() is, and it could be confusing having to choose which one to use.

However, if compound indexes has been defined, there would be a possiblity to utilize them and allow orderBy() on a Collection. We could otherwise emulate orderBy() by using sortBy() internally.

Join the discussion!

Sign-in with GitHub to comment