Get Started With Drizzle ORM - Migrations, Queries & more!
HTML-код
- Опубликовано: 11 янв 2024
- There are plenty of TypeScript ORMs for Postgres out there but Drizzle ORM is coming in hot and everyone seems to be talking about it. I figured since I've never used it before, the easiest way to pick it up is by building a small API with it. Using Express.js, I built a blogging API where users can create blog posts.
#drizzleorm #restapi #expressjs
Project Template: github.com/cdbrw/express-post...
Finished Project: github.com/cdbrw/drizzle-orm-...
Drizzle Documentation: orm.drizzle.team/docs/overview
My Socials
✍️ Blog: links.cdbrw.com/blog
🗄️ GitHub: links.cdbrw.com/github
🐦 Twitter: links.cdbrw.com/x
Products I Use
🌐 My browser: links.cdbrw.com/browser
🎥 Recording software: links.cdbrw.com/recording
🎤 Microphone: links.cdbrw.com/mic
🦾 Microphone stand: links.cdbrw.com/mic-stand - Наука
Drizzle is really impressive. Like how it’s lighter but also feels lighter than other ORMs. I think that query api and the more sql-like api exist so users can use what feels comfortable to them. Feels less opinionated / strict on how the library works.
Just discovered your channel. Enjoying the content! I’ve subscribed.
Exactly, I definitely want to build more stuff with it. Theres also Kysely out there and I know Prisma added an extension for Kysely which I want to also try soon. Maybe I can make a comparison video 🤔
Thanks for the support 🙌
Great video. Thanks!
great one. Thanks for sharing.
Having projects with pure SQL for years, I find it very easy to go with drizzle compared to prisma. Foreign keys are a complete mess in Prisma as well, very convoluted and hard to get the grips of.
Smooth video dude well done
thanks, I really appreciate it 🙏🏼
Subbed thanks 👊🏼
just discovered your channel and it's great! loving a lot of the vids you posted - awesome stuff!
what jetbrains theme / icon pack do you use btw?
Thanks, glad youre finding them useful 🙌
The theme is called Neo Night and I think the icon pack is just the Material Icons one
awesome
Can you please a similar video with prisma and postgres, good to know what a senior developer does to make a robust backend.
Great video, thanks for the info
Thanks for the suggestion, will add it to my list 🙏
what editor/ theme you are using?
Editor is called Webstorm and theme is Neo Night 👍
But why not just used SQL statesments, the same way you want use pure CSS instead of Tailwind in a React or Vue project???
Cool stuff, also make some more content of drizzle orm deployment and how to rollback if dev environment with next js
Will add that to my list, thanks 🙌
hey check out the video I just uploaded for the deploy process 👀. its a bun project that uses Elysia and Drizzle ORM
ruclips.net/video/fZyAx97hzfw/видео.html
Hi,
My server is not running I keep getting the error "server-1 exited with code 0", I had to run the server normally from the terminal to follow along, is there a way to resolve this issue?
Hey, what do you mean by you had to run the server normally from the terminal? How were you running it before?
Cool content, can you please make a video...how to insert bulk data in table using drizzle
oh I should have included that in this video sorry 😞 the video was getting so long that I had to cut back on a lot of things. I will include it in future ORM videos for sure!
Cool! I like the more sql-like way of Drizzle. What's your theme by the way?
I'm using webstorm and the theme is called Neo Night 😁
@@cdbrw Thank you so much! I’m currently using WebStorm as well, and I would greatly appreciate it if you could make a video about its configuration and plugin selection. It seems that most of the available resources on this topic are somewhat outdated now.
Hmm yea that’s a good idea. Will need some time before I make a video like that tho since I switched to Webstorm pretty recently so I’m still getting used to it 🤔
how you are able to use await in top level? I am using tsx and tried different tsconfigs then also no luck
for the migration script?
@@cdbrwyes
@@cdbrwyes
@@cdbrwyes
@@cdbrwyes
Please make a video of using bun with webrtc on the client side.
noted 🫡
I don’t understand why everyone in the youtube land hopped on drizzle from kysely. Kysely is very robust and performant, why pick this over that? I can only think of marketing.
maybe I fell for the marketing because I heard of Drizzle first and then Kysely which is why I made a video on it first but I do plan on also making a kysely video and then a comparison video after that between kysel, drizzle and prisma 🤔
What's the advantage of Drizzle over Prisma? It looks like Drizzle configuration is more complex and confusing? The usage is not developer-friendly with too many imports. For now to me Prisma is still better.
Drizzle have an benchmark page see that prism use scheme engine under the hood to query db but drizzle just raw sql
drizzle with planetscale is blazing fast
A lot of things. It's faster. It can run on edge. Can run on amplify without any other config.
Uses native db queries thus less reads than prisma.
Any ORM, including Prisma, allow native sql queries. I don't use amplify. I suspect Drizzle is faster because it uses native sql queries but loses in convenience.@@heyjitendra
be regular
🤔
Prisma is easier, I feel like I am not smart enough to use DRIZZLE 😕
I would say once you get through the setup process with Drizzle they’re both very similar in the day to day writing code stuff but it does take more effort to get set up
In my opinion, not enough explanations and not enough info to make it work by yourself.
you should use kubernetes
I’ve been wondering if people would be interested in more infra focused content 👀