-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support generic sorting #3373
Support generic sorting #3373
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great (I'm pleased that it was so easy, although some of the code looks familiar, which makes me wonder if there should be a refactoring somewhere), however, it could use some polishing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good enough...unless you still want to change something.... 😉
PBENCH-1126 With pagination, a client (e.g., the dashboard) can't rely on client-side column sorting. Instead, add generalize sorting to `GET /datasets`, allowing the returned datasets to be sorted by any column or metadata value, either ascending (default) or descending. `GET /api/v1/datasets?sort=user.dashboard.favorite:desc,dataset.uploaded` will return all accessible datasets, sorted first by whether the authenticated user has marked the dataset "favorite" and second by the upload timestamp. (All "favorited" datasets will appear first, in upload order, followed by all "non- favorited" datasets in upload order.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
PBENCH-1126
With pagination, a client (e.g., the dashboard) can't rely on client-side column sorting. Instead, add generalized sorting to
GET /datasets
, allowing the returned datasets to be sorted by any column or metadata value, either ascending (default) or descending.GET /api/v1/datasets?sort=user.dashboard.favorite:desc,dataset.uploaded
will return all accessible datasets, sorted first by whether the authenticated user has marked the dataset "favorite" and second by the upload timestamp. (All "favorited" datasets will appear first, in upload order, followed by all "non- favorited" datasets in upload order.)