Skip to content

Commit

Permalink
Update MessageRepository.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-DoHa committed Nov 23, 2022
1 parent 2647944 commit cf50076
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ public interface MessageRepository extends JpaRepository<Message, Long> {
@Query(value = "SELECT * FROM message WHERE to_member_token = :sessionId AND message_id < :id ORDER BY message_id DESC", nativeQuery = true)
List<Message> mainFeedLess(String sessionId, Long id, Pageable pageable);

@Query(value = "SELECT * FROM message WHERE to_member_token = :sessionId AND message_id > :id ORDER BY message_id ASC", nativeQuery = true)
List<Message> prevCursor(String sessionId, Long id, Pageable pageable);

List<Message> findAllByToMemberToken(String memberToken);

Long countAllByToMemberToken(String memberToken);
Expand Down

0 comments on commit cf50076

Please sign in to comment.