Views in MongoDB

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • Here are the basics on views, how I'm using them in my project, and how you can use them in your projects.

Комментарии • 5

  • @AnkitSaini-oc8tm
    @AnkitSaini-oc8tm 5 месяцев назад +1

    Its ok to create a view directly with compass, but if we need to keep the aggregation pipeline in code for reference, like we do in sequelize while writing migrations. So that in the future if we want to update an existing view, it will be helpful.
    How can we achieve this?

    • @jeremypersing4484
      @jeremypersing4484  5 месяцев назад

      I’m not sure I understand the question, but you can just think of a view as an aggregation pipeline. So in your code you would just have an aggregation pipeline querying your database and that’s what you would come back to when you need to change something.

    • @ade8175
      @ade8175 Месяц назад

      You can creat an aggregation pipeline using code instead of compass. It achieves the same outcome and you can save your code.

  • @MrGoGetItt
    @MrGoGetItt 10 месяцев назад

    Great work here! Explanation was very clear & the example was well-chosen to make it easily understandable.

    • @jeremypersing4484
      @jeremypersing4484  10 месяцев назад

      Thank you man, I really appreciate the comment. It lets me know these videos actually helped someone out.