Skip to content

Commit 6973b0a

Browse files
Update pagination.md
1 parent b309f6f commit 6973b0a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pagination.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,13 @@
88
References:
99
- https://jsonapi.org/profiles/ethanresnick/cursor-pagination/
1010
- https://hackernoon.com/guys-were-doing-pagination-wrong-f6c18a91b232
11+
12+
13+
14+
## Cursor or keyset pagination
15+
16+
- preferred over offset limit
17+
- works under certain condition (best with a single column that is unique, unchanged)
18+
- how to deal with multiple columns? create a new column that is unique and computed
19+
- might not work well if you need to sort by values that changes dynamically, e.g. product stocks count, product rating, because when the value changes, the pagination may break (duplicate items etc)
20+
- might not work if you need to jump between pages

0 commit comments

Comments
 (0)