-
-
Notifications
You must be signed in to change notification settings - Fork 44
DB sort by method #490
Copy link
Copy link
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
I am querying a db table with many rows. I want to filter by a field, then get the 5 objects with the greatest values. I was thinking something like this, to get the 5 oldest people above the age of 18:
If I had to get all fields, then sort them within the Rust code and not the db query, I could risk high RAM usage. Also with the risk of less readable/fluent code.