ITADN

Add cursor pagination

#984Opensobolevn 创建于 2026-04-27
feature
S
sobolevncommented
We should support cursor pagination natively. Right now we support Django's own paginator which is limit / offset based. But, we should provide the same API for our own cursor paginator. Why? - Because current eixting Django tools lack typing - Because cursor pagination is the only option to use with big amounts of data - Because it is rather easy to implement and support We should provide a solution that will work on all possible databases that Django support. We can add new test jobs to test this on sqlite / postgres / mysql databases. Refs: - https://github.com/litestar-org/litestar/blob/main/litestar/pagination.py#L274 - https://github.com/photocrowd/django-cursor-pagination/blob/master/cursor_pagination.py Maybe we should also consider adding page-size paginator?
8 条评论