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
  • НаукаНаука

Комментарии • 49

  • @TannerBarcelos
    @TannerBarcelos 6 месяцев назад +3

    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.

    • @cdbrw
      @cdbrw  6 месяцев назад

      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 🙌

  • @bh3553
    @bh3553 4 месяца назад

    Great video. Thanks!

  • @yuxiang4218
    @yuxiang4218 6 месяцев назад

    great one. Thanks for sharing.

  • @screemoh
    @screemoh 6 месяцев назад +3

    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.

  • @Lucas-gt8en
    @Lucas-gt8en 6 месяцев назад

    Smooth video dude well done

    • @cdbrw
      @cdbrw  6 месяцев назад

      thanks, I really appreciate it 🙏🏼

  • @zscoder
    @zscoder 5 месяцев назад

    Subbed thanks 👊🏼

  • @aryan.prince
    @aryan.prince 5 месяцев назад

    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?

    • @cdbrw
      @cdbrw  5 месяцев назад +1

      Thanks, glad youre finding them useful 🙌
      The theme is called Neo Night and I think the icon pack is just the Material Icons one

  • @rangabharath4253
    @rangabharath4253 6 месяцев назад

    awesome

  • @ayushrameja
    @ayushrameja 4 месяца назад

    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

    • @cdbrw
      @cdbrw  4 месяца назад +1

      Thanks for the suggestion, will add it to my list 🙏

  • @ShahnawazSayyad
    @ShahnawazSayyad 6 месяцев назад

    what editor/ theme you are using?

    • @cdbrw
      @cdbrw  6 месяцев назад +1

      Editor is called Webstorm and theme is Neo Night 👍

  • @papa_ethan
    @papa_ethan Месяц назад

    But why not just used SQL statesments, the same way you want use pure CSS instead of Tailwind in a React or Vue project???

  • @randy5030
    @randy5030 6 месяцев назад

    Cool stuff, also make some more content of drizzle orm deployment and how to rollback if dev environment with next js

    • @cdbrw
      @cdbrw  6 месяцев назад +1

      Will add that to my list, thanks 🙌

    • @cdbrw
      @cdbrw  4 месяца назад +1

      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

  • @davidbodunrin87
    @davidbodunrin87 4 месяца назад

    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?

    • @cdbrw
      @cdbrw  3 месяца назад

      Hey, what do you mean by you had to run the server normally from the terminal? How were you running it before?

  • @asadmehboob1300
    @asadmehboob1300 6 месяцев назад +1

    Cool content, can you please make a video...how to insert bulk data in table using drizzle

    • @cdbrw
      @cdbrw  6 месяцев назад +2

      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!

  • @mattam240
    @mattam240 6 месяцев назад

    Cool! I like the more sql-like way of Drizzle. What's your theme by the way?

    • @cdbrw
      @cdbrw  6 месяцев назад

      I'm using webstorm and the theme is called Neo Night 😁

    • @mattam240
      @mattam240 6 месяцев назад

      ⁠@@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.

    • @cdbrw
      @cdbrw  6 месяцев назад

      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 🤔

  • @deadnewt7901
    @deadnewt7901 4 месяца назад

    how you are able to use await in top level? I am using tsx and tried different tsconfigs then also no luck

  • @oussamasethoum1665
    @oussamasethoum1665 5 месяцев назад

    Please make a video of using bun with webrtc on the client side.

    • @cdbrw
      @cdbrw  5 месяцев назад +1

      noted 🫡

  • @h3mb3
    @h3mb3 6 месяцев назад +1

    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.

    • @cdbrw
      @cdbrw  6 месяцев назад

      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 🤔

  • @firewatermoonsun
    @firewatermoonsun 6 месяцев назад

    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.

    • @SR-zi1pw
      @SR-zi1pw 6 месяцев назад +1

      Drizzle have an benchmark page see that prism use scheme engine under the hood to query db but drizzle just raw sql

    • @sujjee
      @sujjee 6 месяцев назад

      drizzle with planetscale is blazing fast

    • @heyjitendra
      @heyjitendra 6 месяцев назад

      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.

    • @firewatermoonsun
      @firewatermoonsun 6 месяцев назад

      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

  • @arupde6320
    @arupde6320 6 месяцев назад

    be regular

    • @cdbrw
      @cdbrw  6 месяцев назад

      🤔

  • @nemila4904
    @nemila4904 5 месяцев назад

    Prisma is easier, I feel like I am not smart enough to use DRIZZLE 😕

    • @cdbrw
      @cdbrw  5 месяцев назад +2

      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

  • @tonyloo1207
    @tonyloo1207 3 месяца назад

    In my opinion, not enough explanations and not enough info to make it work by yourself.

  • @ViperPacket
    @ViperPacket 3 месяца назад

    you should use kubernetes

    • @cdbrw
      @cdbrw  3 месяца назад

      I’ve been wondering if people would be interested in more infra focused content 👀