Рет қаралды 40,415
👉 Check out Prisma: www.prisma.io/... (paid sponsorship & I get commission from your purchases)
Disclaimer: this is a sponsored video (paid). It's your responsibility to evaluate safety, accuracy and other relevant parts of the reviewed product.
👉 NEW React & Next.js Course: bytegrad.com/c...
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship).
👉 Check out Kinde for auth and more bit.ly/3QOe1Bh
👉 NEW React & Next.js Course: bytegrad.com/c...
👉 Professional JavaScript Course: bytegrad.com/c...
👉 Professional CSS Course: bytegrad.com/c...
👉 Web development roadmap 2024 & 2025: email.bytegrad...
👉 Email newsletter (BIG update soon): email.bytegrad...
👉 Discord: all my courses have a private Discord
⏱️ Timestamps:
00:00 Intro
01:07 Next.js architecture
02:02 Example app overview
03:15 Setup Prisma
06:09 Schema fundamentals
07:36 Prisma extension + defaultFormatter
08:34 Schema fundamentals (continued)
10:09 Create database
12:38 View database content (Prisma Studio)
14:13 GET data on page (findMany)
16:50 Prisma Client instantiation
18:29 GET data on page (findUnique)
22:18 Changing schema (Slug) - npx prisma db push
25:38 @unique
27:42 @map
28:04 @index
28:53 Filtering (where)
29:55 Ordering
30:18 Select
31:00 Pagination
32:29 Count
33:42 Writing data (POST / PUT / DELETE)
42:03 Relations (one-to-many)
43:54 Many-to-many
44:27 One-to-one
46:50 include & connect (relations queries)
49:12 Seeding database
51:10 Prisma types
53:13 Seeding database (continued)
55:50 Error handling
57:35 Caching in Next.js
59:59 Prisma Accelerate caching
1:00:34 Going to production
1:04:32 Migrations
1:06:15 npx prisma migrate
1:08:18 postinstall (prisma generate)
1:08:42 Push to Vercel
1:10:19 Serverless vs Edge
1:10:59 Middleware (edge)
1:13:07 Prisma Pulse
#webdevelopment #reactjs #nextjs