Mongoose Hooks are useful for running middleware functions before or after a query or operation. We can also add custom methods to Document instance for adding specific functionalities related to documents. Similarly, Mongoose provides the Static methods to bind on Models. There also exists Query Helpers to extend the find queries functionality. This video demonstrates the use of Hooks, Instance methods, Static Methods, and Query Helpers.
▬▬▬▬▬▬ 🔗 Links ▬▬▬▬▬▬
► GitHub (Source code): https://bit.ly/3LVA05u
► NestJS - Mongoose Schemas : • NestJS #40 - MongoDB & Mongoose | Schemas ...
► NestJS - Mongoose Models : • NestJS #41 - MongoDB & Mongoose | Concept ...
► NestJS - Mongoose Users CRUD : • NestJS #42 - MongoDB & Mongoose | Users CR...
▬▬▬▬▬▬ 📚 CHAPTERS ▬▬▬▬▬▬
00:00 - Introduction
01:00 - Populate Field
03:06 - Pre "findOne" Hook Middleware
06:16 - Populate & Fields Projection
07:16 - Pre "find" Hook Middleware
09:23 - Pre "save" Hook Middleware - Hash Password before save
13:03 - Document Instance Method - Password compare
20:12 - Model Static method - User findByEmailAndPassword
25:48 - Query Helpers - Extend Find Queries
32:54 - Closing notes
▬▬▬▬▬▬ 🔖 RECOMMENDED COURSES ▬▬▬▬▬▬
🎬 Angular In-Depth (Hindi) - https://bit.ly/34nHrBh
🎬 Angular Architecture - • 1. Angular Architecture | Angular In Depth...
🎬 NestJS Framework | Backend Development (Hindi) - https://bit.ly/3titPk3
🎬 RxJS - The Practical Guide (Hindi) - https://bit.ly/3GBcXsf
🎬 RxJS - Promise vs Observable | A depth comparison - • 5. RXJS - Promise vs Observable | A depth ...
🎬 RxJS - Introduction to Reactive programming - • 1. RXJS - Introduction to Reactive program...
▬▬▬▬▬▬ CONNECT WITH ME 👋 ▬▬▬▬▬▬
🐦 Twitter: / akacomputerbaba
🏠 Discord: https://bit.ly/3Js25iy
👓 GitHub: https://github.com/cistroncoder
📧 Email: [email protected]
💙 Join this channel
/ computerbabaofficial
▬▬▬▬▬▬ 🎻 MUSIC ▬▬▬▬▬▬
🎵 Fresh Start - Joakim Karud
https://freesound.org
▬▬▬▬▬▬ # HASHTAGS ▬▬▬▬▬▬
#AmazingNestjs #nestjs #computer_baba #mongodb #mongoose #mongoose_model #mongoose_schemas #bcrypt #password_hashing #pipes #nestjs_pipes #data_transformation #microservices #dependency_injection #ioc_container #routing #nestjs_project #nodejs #rest_api #http #expressjs #fastify #graphql #mongodb #sql #typeorm #microservices #backend_development #javascript #typescript #rxjs #json