-
Notifications
You must be signed in to change notification settings - Fork 135
Description
I would like to suggest adding reversed methods to sqlitedict, such as reversed_keys(), reversed_items(), and reversed_values(). Currently, there are no built-in ways to get content in reverse order from sqlitedict, and I think it would be graceful and more efficient to have such methods available.
Having reversed methods would be useful for various use cases, such as iterating over a sqlitedict in reverse order, finding the last item in a dict, or checking if a dict contains a certain item from the end.
I believe that adding reversed methods would be relatively easy to implement by adding the DESC keyword to the underlying SQL statements used by sqlitedict. This would allow for efficient and performant reversed queries without introducing significant overhead.
Overall, I think that adding reversed methods to sqlitedict would be a valuable addition to the library and would improve its usability and flexibility.
Thank you for considering this suggestion.