Proper Pagination with filtering and sorting for a datagrid questions after watching latest stream

so I saw that offset and limit have a bunch of quirks and isn't an efficient method of pagination at scale from the last stream, but this left me with a bunch other questions as well. For example you have a datagrid of some sorts that allows for sorting, paginating, and filtering. How would it look from a query params perspective in a rest api when these are complex filters? - I happen to use python\fastapi for backend ( work requirement ), and the query params piece has always stumped me because I feel like I am essentially writing code to handle something I feel like should be already have been solved by many others, this in my eyes becomes some form of query params conversion to a sql where clause, and can't seem to find anything out there that breaks a system for handling it dynamically cleanly. The tools I did find seem very limited. When a filter is changed and a new set of results are queried via the rest api, do you just reset the datagrid to the first page, or is it better to just fetch a page (or few) worths of data and begin loading the rest of the data page by page in the background to do filtering in the frontend via the datagrid. I know in the cases of a few thousand rows this might be a non issue, but how is this handled with larger dataset? On the note of offset and limit pagination having quirks, I saw that you can use something like cursor, or Keyset paging, however let's say you already grabbed the first page of results, and one record was deleted, even with these other paging methods can't you run into issues with the datagrid being out of sync unless you have some form websocket or per record checks to see if they exist if you cache these values locally? sorry for the wall of text, I am getting overwhelmed with the million and one ways I see these things handled, and am struggling parsing through it all without crossing my strings.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?