-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add paging and sorting functionality to find all/search functionality #1969
Comments
Can I take this one? |
Sounds good @akshay-ap. i've already done sorting for the For this, I'm hoping we can end up with:
and
if a page request is provided, it should return a class Page {
T[] content;
size: number; // the size of the page
number: number; // the page number of the returned page
totalElements: number; // the total elements that would be returned by query
totalPages: number; // total number of pages that would be for this query
getNextPage(): Page<T>
getPreviousPage(): Page<T>
hasNextPage: boolean
hasPreviousPage: boolean
} Page request should look like: interface PageRequest {
number: number; // requested page number
size: number; // requested size of the pages
} sort and page should always be optional and if they are not provided then we should default to Unsorted and Unpaged. paging and sorting should always be done at the PouchDB level we should be able to support getting a specific page and getting the next and previous page. |
@jackcmeyer Thanks for the pointers! |
@akshay-ap No worries, please let me know if you have any questions. I've done a little bit of research into this. |
Change Page interface, Fix failing tests fix HospitalRun#1969
🚀 Feature Proposal
Add paging and sorting functionality to the search/find all functions for patients, appointments, lab.
Motivation
The text was updated successfully, but these errors were encountered: