Skip to content

[Feat] #257: 커서페이징 도입#258

Open
oneeee822 wants to merge 4 commits into
developfrom
feature/257
Open

[Feat] #257: 커서페이징 도입#258
oneeee822 wants to merge 4 commits into
developfrom
feature/257

Conversation

@oneeee822

@oneeee822 oneeee822 commented Mar 15, 2026

Copy link
Copy Markdown
Collaborator

#⃣ 연관된 이슈

close #257

📝 작업 내용

기존에 사용하던 오프셋 페이징을 커서페이징으로 구현했습니다.

  • 전체 개수를 세는 count 쿼리를 없애기 위해 Page 대신 Slice를 사용
  • 기존 오프셋 페이징용 PageInfo 대신 커서 정보를 담을 CursorPageInfo를 record로 생성

📸 스크린샷 (선택)

image image --- image image

💬 리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

@oneeee822 oneeee822 self-assigned this Mar 15, 2026
@oneeee822 oneeee822 added the ✨ feature New feature or request label Mar 15, 2026
@oneeee822 oneeee822 linked an issue Mar 15, 2026 that may be closed by this pull request
3 tasks

@yooniicode yooniicode left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전반적으로 잘 구현해두신 것 같아요! 몇 가지 피드백 적었으니 확인 부탁드립니다. :)

);

Slice<Bubble> findByMember_MemberIdAndIsTrashedFalseOrderByBubbleIdDesc(Long memberId, Pageable pageable);
Slice<Bubble> findByMember_MemberIdAndIsTrashedFalseAndBubbleIdLessThanOrderByBubbleIdDesc(Long memberId, Long cusorId, Pageable pageable);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오타낫더요..

nextCursorId = bubbleSlice.getContent().get(bubbles.size()-1).getBubbleId();
}

CursorPageInfo pageInfo = new CursorPageInfo(cursorId, bubbleSlice.hasNext(), pageable.getPageSize());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

위에서 계산한 nextCursorId가 들어가야 할 것 같습니다.

CursorPageInfo pageInfo = new CursorPageInfo(nextCursorId, bubbleSlice.hasNext(), pageable.getPageSize());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [FEAT] 커서 기반 페이징

2 participants