Learn Drizzle In 60 Minutes

  Рет қаралды 32,359

Web Dev Simplified

Web Dev Simplified

Күн бұрын

Drizzle is a relatively new database ORM that aims to solve many of the problems with existing ORMs by being more flexible and performant. They have definitely accomplished their goals, but learning Drizzle can be quite overwhelming. In this crash course I will teach you everything you need to know about Drizzle to use it in your very own projects.
📚 Materials/References:
Prisma Vs Drizzle Video: • Is Drizzle Really Bett...
SQL Crash Course Video: • Learn SQL In 60 Minutes
Prisma Crash Course Video: • Learn Prisma In 60 Min...
🌎 Find Me Here:
My Blog: blog.webdevsimplified.com
My Courses: courses.webdevsimplified.com
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/WebDevSimplified
CodePen: codepen.io/WebDevSimplified
⏱️ Timestamps:
00:00 - Introduction
00:57 - What Is Drizzle
02:42 - Drizzle Setup
07:12 - Schema Basics
10:30 - Migration Setup
15:47 - Finalizing Setup
18:57 - Schema Advanced
30:59 - Inserting Data
35:47 - Query Style Data Select
49:30 - SQL Style Data Select
54:14 - Updating Data
55:20 - Deleting Data
#DrizzleORM #WDS #Drizzle

Пікірлер: 80
@DavidBowmanJr
@DavidBowmanJr 5 күн бұрын
elite video. 60-minutes, no fluff, no ads, well organized, from the documentation. greatest hair in the business.
@404-not-found-service
@404-not-found-service Ай бұрын
Thank you, I was just looking for a Drizzle course, it seems like an orm that is currently very efficient
@theisoj
@theisoj Ай бұрын
I waited this for so long and now it is here! Thanks Kyle!
@poh9044
@poh9044 Ай бұрын
I swear you read my mind, just in time! Thanks Kyle
@mythmaker6155
@mythmaker6155 Ай бұрын
the timing of this video and my learning thirst for DRIZZLE is right on time.... thanks
@gregwalton331
@gregwalton331 12 күн бұрын
Got everything working, thank you for this super tutorial, really clear!
@ruskasielu6261
@ruskasielu6261 Ай бұрын
Thanks for the video. Drizzle is indeed pretty nice, but their documentation could be improved. Tried to set it up with SQLite and it took me a long time to figure out, and the help of a blog that someone who encountered the same issues as I did fortunately wrote. They should be clearer on the different steps, where to put what code (which files and dicrectory) and such. The whole system of migrations is also still pretty confusing so far.
@skyhappy
@skyhappy Ай бұрын
You should add a pull request to improve it
@muhammadisa440
@muhammadisa440 20 күн бұрын
Thanks Kyle, it helped me a lot!
@harunjeylan9362
@harunjeylan9362 23 күн бұрын
Thanks, bro, this is what I'm looking for.🙏
@mohammedshamil1626
@mohammedshamil1626 27 күн бұрын
Crazy timing bro, just started a project using drizzle a couple of weeks back
@eliuddyn
@eliuddyn Ай бұрын
Amazing content 🔥🔥
@jens-mikaelstjernberg1037
@jens-mikaelstjernberg1037 20 күн бұрын
But how do i update a table (eg. addidng a new column) without deleting the existing data in that? So far everytime I've done that the data gets the deleted and the drizzle doc doesn't include any information about how this would be done? Any suggestions are appreciated
@iwas23
@iwas23 15 күн бұрын
Really nice video mate. Hope you cover the dynamic query in upcoming video 🎉🎉❤
@adanos2006
@adanos2006 Ай бұрын
awesome. as always
@user-qj4rr1rm8i
@user-qj4rr1rm8i Ай бұрын
28:18 Thank you again for sharing your knowledge and efforts, Kyle. I have a question to ask while I'm watching this video. at 28:18 about the foreign key, // One way of handle a foreign key was like... export const UserPreferencesTable = pgTable("userPrefenrences", { id: uuid("id").primaryKey().defaultRandon(), userId: uuid("userId").references() }); // Another way of handle a foreign key... export const PostCategoryTable = pgTable("postCategory", { id: uuid("postId").references(() => PostCategoryTable.id).notNull(), categoryId: uuid("categoryId").references(() => CategoryTable.id).notNull() }, table => { pk: primaryKey({ columns: [table.postId, table.categoryId]}) }); Assuming, first one just refers to a foreign column, while second one is creating actual foreign key for foreign key, am I right?
@carltongordon
@carltongordon Ай бұрын
Hey Kyle, can we get. video on how you plan your projects?
@DivinPrince
@DivinPrince Ай бұрын
Drizzle such a good ORM
@ryujinwatatsumi
@ryujinwatatsumi Ай бұрын
Can we get the link for the notion notes please ?
@frontend_ko
@frontend_ko Ай бұрын
Thanks for nice video
@roodood
@roodood Ай бұрын
So in in Rails, I get these commands from the get-go: db:create, db:migrate db:rollback, db:drop etc and they do exactly as you imagine. Why doesn't drizzle ship them directly but instead require to write them myself?
@larrymcfarlane6202
@larrymcfarlane6202 Ай бұрын
Let me save someone some time if you're getting an error like [PostgresError: unrecognized configuration parameter 'schema'] when trying to migrate. I copied and pasted my DATABASE_URL with the '?schema=public' param at the end. Check yours before diving too deep. :) Thanks for the video Kyle!
@fabienpineau1580
@fabienpineau1580 25 күн бұрын
For a small end of the year project in IT study, is it useful to use migration? I'm still struggling to understand the whole scope of migration in database
@carterv.31
@carterv.31 Ай бұрын
Very nice video
@anuvette
@anuvette Ай бұрын
Please make an in-depth tutorial on tanstack router
@depreza68
@depreza68 Ай бұрын
is there no repo? :(
@farzadmf
@farzadmf Ай бұрын
It would have been nice to also share the code
@ayushgogna9732
@ayushgogna9732 11 күн бұрын
can i do nested inserts like prisma in drizzle if yes how ? like i want to create user with posts
@DihCpsPsy
@DihCpsPsy 17 күн бұрын
How can I push a new item to an array field? And how to remove one specific item?
@destocot1729
@destocot1729 24 күн бұрын
anyone know the difference between Postgres.JS and the node-posgres (pg) packages seems that node-posgres is used a lot more
@NathanielBabalola
@NathanielBabalola Ай бұрын
I'm yet to adopt this as i heard they truncate tables a lot during migration. Until it gets better i don't think I'll. Laravel hardly truncates tables
@dstick14
@dstick14 Ай бұрын
Developers will do everything but learn SQL
@nepolianpratik9890
@nepolianpratik9890 Ай бұрын
And CSS
@chudchadanstud
@chudchadanstud Ай бұрын
nmp. Should have made it intuitive from the start
@dstick14
@dstick14 Ай бұрын
@@chudchadanstud even still ORMs are not a solution then it's a bandage
@asthedreamfadesaway
@asthedreamfadesaway Ай бұрын
I mean sure you should learn SQL first, but then if you want to prevent SQL injections manually or ignore type checking and find out whether it works or not during runtime, or want to manually review all the code for DB migrations to other DB (e.g. mysql to postgresql) you can use raw SQL
@beyourahi
@beyourahi Ай бұрын
go cry in a corner
@gregwalton331
@gregwalton331 15 күн бұрын
Great tutorial, thank you. but, I am getting this error TypeError: Cannot read properties of undefined (reading 'Symbol(drizzle:Columns)') when I am trying to insert to a table. The migrate works perfectly fine, so can connect to the db. Here is the code. import "dotenv/config" import { db } from "./drizzle/db" import { tBrand } from "./drizzle/schema" async function main() { await db.insert(tBrand).values({ name: 'Andrew'}) } main() The db is a neon postgres db. thanks
@gregwalton331
@gregwalton331 12 күн бұрын
sorted.
@zivtamary
@zivtamary Ай бұрын
why do we need this prisma replacement though?
@imkir4n
@imkir4n Ай бұрын
Wow i just completed watching prisma in 60mins
@darkmift
@darkmift 15 күн бұрын
is there a repo of your work here?
@boltyk1
@boltyk1 18 күн бұрын
drizzle drizzle :)
@chaitanyasharma6270
@chaitanyasharma6270 Ай бұрын
I love you
@PanicAtProduction
@PanicAtProduction Ай бұрын
30:13 that’s why you should not use orms. Let’s think we have a production database, we want to add a new column which can not be a null. What are we going to do? Deleting whole table? This must be fixed. The same issue was in Strapi 2 years ago and my cluster died because of the db migration.
@samwise8731
@samwise8731 Ай бұрын
Prisma's schema syntax is way superior to this. It also helps with relationships. Drizzle's schema files is a mess.
@M1a2n3o43
@M1a2n3o43 Ай бұрын
Prisma schemas are so easy to read and understand. The prisma extensions also formats them pretty neat 😂. A sql schema is easier to read than drizzle imo
@das_daily_
@das_daily_ 27 күн бұрын
yeah but it so slow
@BamboodjaOfficial
@BamboodjaOfficial Ай бұрын
Eloquent -> Drizzle
@montebont
@montebont Ай бұрын
OMG...how many wrappers do you need to simply access a SQL database ? These are solutions looking for a problem that does not exist :-( In my use cases I just load a million data records into my app. The browser and OS can handle that...
@codie1372
@codie1372 7 күн бұрын
well it get complicated when you have a big database with alot of tables
@imshivampancholi
@imshivampancholi Ай бұрын
First View🤩
@webminsk7884
@webminsk7884 8 күн бұрын
Пушка!
@editedbycomradezeusman1642
@editedbycomradezeusman1642 Ай бұрын
Kyle you were my inspiration for starting web dev, kyle please i need help debugging an error in my server code, i am using nodejs, please i need help
@Nodsaibot
@Nodsaibot Ай бұрын
just use firebase lol
@jellyfish1772
@jellyfish1772 Ай бұрын
Give us YOUR note😒
@a1x5h04
@a1x5h04 Ай бұрын
Prisma is Good but Drizzle is Better
@SSPARTHIBAN-bq3hc
@SSPARTHIBAN-bq3hc Ай бұрын
Devin AI can replace frontend developer anybody reply me pls
@jacob5403
@jacob5403 Ай бұрын
it's an absolute nightmare, that returning function doesn't exist for mysql, I went through docs, cannot see a way to get at least "last insert id"
@ayushgogna9732
@ayushgogna9732 3 күн бұрын
(mentioned the code missing below) I think you are missing a step when you set relation between many to many relation fir you have to set many(PostCategory) then you have to create another relation which is one(Post) one(Category) with reference and fieldId to connect each other with PostCategoryTable. I am talking about this step you are missing export const usersToGroupsRelations = relations(postToCategory, ({ one }) => ({ group: one(PostTable, { fields: [postToCategory.postId], references: [PostTable.id], }), user: one(CategoryTable, { fields: [postToCategory.categoryId], references: [CategoryTable.id], }), }));
@Tanner-cz4bd
@Tanner-cz4bd Ай бұрын
but you just made an ecommerce tutorial with next.js/ prisma?!! can we get something Auth + crud + nextjs?
@TheRicoco2011
@TheRicoco2011 Ай бұрын
Nextjs + Auth + CRUD with Drizzle and how to host it on the cloud 🎉
@AdolfRizzler41
@AdolfRizzler41 Ай бұрын
Drizzle , prisma what next
@AdolfRizzler41
@AdolfRizzler41 Ай бұрын
I didn't know sql hate is this strong💀
@BigFattyNat
@BigFattyNat Ай бұрын
u know what else allows me to avoid writing raw sql queries? fookin any LLM bro, u said the query and it gives u the sql. fk these orms. raw sql is what runs im the background either way
I Love This CSS Focus Hack
6:29
Web Dev Simplified
Рет қаралды 17 М.
Is Drizzle Really Better Than Prisma?
20:15
Web Dev Simplified
Рет қаралды 63 М.
ШЕЛБИЛАР | bayGUYS
24:45
bayGUYS
Рет қаралды 504 М.
INO IS A KIND ALIEN😂
00:45
INO
Рет қаралды 21 МЛН
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 442 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 376 М.
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 323 М.
Corel Linux - The (Word)Perfect Operating System
25:40
Michael MJD
Рет қаралды 92 М.
Learn Drizzle ORM in 13 mins (crash course)
14:00
Neon
Рет қаралды 16 М.
Migration Lesson: Don't Use Prisma | Prime Reacts
29:16
ThePrimeTime
Рет қаралды 141 М.
Why I Quit Copilot | Prime Reacts
35:56
ThePrimeTime
Рет қаралды 241 М.
How To Actually Get Hired In 2024
10:43
Web Dev Simplified
Рет қаралды 185 М.
ШЕЛБИЛАР | bayGUYS
24:45
bayGUYS
Рет қаралды 504 М.