pagination 구현 시 고려사항 및 Cursor-based pagination 구현
Offset-based paging 기본적으로 사용하게 되는 pagination 방식이다. API를 호출할 때 page, limit parameters를 사용하여 데이터를 호출한다. // 한 페이지당 10개의 item을 보여주는 경우 const itemCount = 10; db.items.find({ }).sort({_id:-1}).skip((page-1)* itemCount).limit(itemCount) # API 요청 예시 curl https://api.github.com/user/repos?page=2&per_page=10 결과 list가 추가되거나 삭제되면 item이 빠지거나 2번 반복되는 경우가 생길 수 있다. 첫 번째 페이지에 10개를 요청하고 하나의 item이 지워졌다면 지워지기 전 11번..
develop
2020. 8. 20. 10:12
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- commit message
- aws
- NLP
- AWS community day seoul
- Neptune
- Cognito
- Prisma
- mognodb
- inversify
- Elasticsearch
- mongoDB
- lambda@edge
- Github Actions
- shorten
- sementic version
- nltk
- graphql
- Python
- Lifecycle
- Clickjacking
- slowquery
- Develop
- JavaScript
- typescript
- pagination
- nginx
- conventional commit
- Airflow
- Terraform
- Cloudfront
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함