Order DataStores by something other than raw value

As a Roblox developer, it is currently too hard to store data that needs to be displayed in a sorted list.

OrderedDataStores seem extremely powerful since you can get many keys at once in a sorted manner, but they have one catch: all you can store is one number, or if you’re creative, 50 characters worth of data.

This is so close to being so useful. It would be great if we could store any data and attach 1 or more values that we can sort by.

If Roblox is able to address this issue, it would allow me to make more interconnected and data-rich game-wide leaderboards and communication tools.


Rather than providing a value to sort by, I think it would be more beneficial if we could provide a comparator function for the ordered datastore

That would definitely be useful, and better than this suggestion. Based on the current API, I don’t think it’s feasible though. It looks like OrderedDataStore pages work because the database they are using lets them get that many items at once instead of using individual queries for each item. I don’t think the database would allow using a Lua comparator, and getting each item individually would run into the same limits and throttling you’d get if you did that in plain Lua.