NestJS Full Course -6: CRUD
Вставка
- Опубліковано 5 вер 2024
- NestJS Full Course: CRUD with TypeORM Repository Pattern
Hey guys, welcome back to the NestJS full course! Today, we're diving into CRUD operations using the TypeORM repository pattern.
So, TypeORM gives us two ways to handle CRUD: query builder and repository pattern. This video focuses on the repository pattern. Basically, TypeORM creates a repository class for each entity in your database schema. This repository class is super powerful for doing CRUD operations, both simple and complex.
Let's break down CRUD:
Create: We'll see how to create a new property record in the database. We'll inject the property repository class into the property service and use the save function to insert a new property.
Read: We'll cover how to find one specific property and retrieve all properties. The find one function takes an ID parameter and searches based on that ID. The find all function grabs everything from the database.
Update: We'll learn how to update a property. We'll pass the ID of the property we want to change and the data that needs updating.
Delete: We'll see how to delete a property from the database. We'll simply pass the ID of the property we want to remove.
Heads up, in the next videos, we'll tackle creating relationships between tables and doing even more complex CRUD operations with TypeORM.
This description captures the key points as you encounter them in the video, making it more engaging for viewers who might be following along.
GitHub Repo(Please Give It a Star⭐ on GitHub): github.com/vah...
Join this channel to get access to perks:
/ @sakuradev
Great thanks Sakura
Thanks a lot 🙏🙏
Excellent explanation…🔥🔥💯🔥 thank you so much 🌈 best which I ever seen…
Thank you so much💓💓💓
Thank you so much 🚀
You’re welcome 😊
Tqsm nanba💙
You're welcome!💙😊
Drizzle >>>>
Just wait for it