NestJs Full Course -11: Pagination

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ก.พ. 2025
  • This video describes how to implement pagination in a NestJS application.
    Pagination is a technique that allows you to fetch data in smaller chunks, rather than all at once. This can improve performance and reduce server load, especially when dealing with large datasets.
    In this video, we will learn how to implement pagination for a property API. We will start by creating a DTO (Data Transfer Object) to validate the pagination parameters. The DTO will have two properties: skip and limit. The skip parameter specifies the number of records to skip before starting to return the results, and the limit parameter specifies the maximum number of records to return in a single query.
    Next, we will add the pagination parameters to the property controller. We will use the @Query decorator to access the query parameters from the request.
    Finally, we will implement the pagination logic in the property service. We will use the skip and limit parameters to configure the query that fetches the data from the database.
    This video is part of a NestJS full course series. The course covers a variety of topics, from basic to advanced, and is suitable for developers of all levels.
    GitHub Repo(Please Give It a Star⭐ on GitHub): github.com/vah...

ความคิดเห็น • 15

  • @Mahadev-x7u
    @Mahadev-x7u 6 หลายเดือนก่อน +1

    Thank you so much for all your self-giving ❤ I saw many courses ... but you created the best course in detail and excellent explanation. Thank you 💯

    • @SakuraDev
      @SakuraDev  6 หลายเดือนก่อน

      I'm truly honored by your kind words! Creating a course that truly helps people is my ultimate goal, so it's incredibly rewarding to hear that I've achieved that. Thank you for taking the time to share your feedback. ❤️❤️❤️

  • @dreamsachiever212
    @dreamsachiever212 6 หลายเดือนก่อน +1

    loving these series. Keep em coming. It's sad that the views aren't motivating. But you're providing top notch value. I would suggest when the series end please merge all the videos into one single video.

    • @SakuraDev
      @SakuraDev  6 หลายเดือนก่อน +1

      Hi, Thanks for you support. Yeah it's really hard for me to see that these videos don't get views...

    • @naddulidaniel3861
      @naddulidaniel3861 5 หลายเดือนก่อน

      @@SakuraDev we are going to push them further. most especially to us who are still learning.

    • @SakuraDev
      @SakuraDev  5 หลายเดือนก่อน

      @@naddulidaniel3861 Thanks for your support ❤❤

  • @peterkisvaradi8488
    @peterkisvaradi8488 13 วันที่ผ่านมา

    Query params are strings when they arrive to the controller. In case of number validation error, modify the PaginationDTO properties with this decorator:
    @Type(() => Number)
    This will transforms the incoming string param to number. (class-transformer lib)

    • @SakuraDev
      @SakuraDev  13 วันที่ผ่านมา +1

      Nice tip 💯. Thanks for your feedback

  • @markjones6894
    @markjones6894 6 หลายเดือนก่อน +2

    Hi, I know I’ve already asked, but when can we get the supabase auth tutorial? I critically need to implement it 😅 Aside from that keep up the videos they are very informative and well made !

    • @SakuraDev
      @SakuraDev  6 หลายเดือนก่อน +1

      Hi, Of course we will have that video soon after this course. Thank 🙏

  • @OCEMTechZone
    @OCEMTechZone 6 หลายเดือนก่อน +1

    Great

    • @SakuraDev
      @SakuraDev  6 หลายเดือนก่อน

      Thank you so much

  • @nesmaaboki7213
    @nesmaaboki7213 2 หลายเดือนก่อน

    the other videos of this series are great but you didn't put the same effort in this one

    • @SakuraDev
      @SakuraDev  2 หลายเดือนก่อน

      Sorry for that