Learn Drizzle ORM in 13 mins (crash course)

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2024

ความคิดเห็น • 51

  • @neondatabase
    @neondatabase  9 หลายเดือนก่อน +11

    If you enjoyed watching this video, make sure to like and subscribe so you don't miss out on any future videos.
    If you'd like to learn more about using Drizzle with Preview Environments, check out our previous video: th-cam.com/video/EOVa68Uviks/w-d-xo.html
    Drizzle ORM Docs: orm.drizzle.team/docs/overview
    Neon Serverless Driver: github.com/neondatabase/serverless

  • @PlayerRPG85
    @PlayerRPG85 8 หลายเดือนก่อน +1

    This is the best intro to Drizzle I've ever seen

  • @JosefuDorayvu
    @JosefuDorayvu 4 วันที่ผ่านมา

    Holy cows! You are a legend for this banger of a crash course, cheers!

  • @bengribbin6440
    @bengribbin6440 9 หลายเดือนก่อน +12

    Excellent and timely tutorial! Would love to see an example of using custom types (adding vector embeddings) through drizzle to Neon too

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน +1

      Glad you found it helpful!
      > Would love to see an example of using custom types (adding vector embeddings) through drizzle to Neon too
      This is a great idea! Thank you for sharing your feedback
      - Mahmoud

  • @8bitWatermelon
    @8bitWatermelon 2 หลายเดือนก่อน +1

    Really enjoyed the video, currently learning to use drizzle for projects. For anyone who is trying to use drizzle-kit generate with cli params. The code in the video will not work. This is my solution after many trials and errors.
    "db:generate": "drizzle-kit generate --dialect postgresql --schema ./src/db/schema.ts --out=./src/db/migrations"
    Thank you.

  • @DanielDrejerDK
    @DanielDrejerDK 9 หลายเดือนก่อน +5

    Well done!
    Only thing I would have loved to see along with this, would be how to retrieve only a few specific columns, rather than everything. :)

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน +10

      If you'd like to do a partial select, you can do it this way
      const result = await db.select({
      field1: users.id,
      field2: users.name,
      }).from(users);
      orm.drizzle.team/docs/select#partial-select

  • @eliastouil7686
    @eliastouil7686 5 หลายเดือนก่อน +1

    This is a great intro thank you! Came here from Fireship's vid.

  • @ThunderboltPath
    @ThunderboltPath 9 หลายเดือนก่อน +7

    Very helpful for understanding Drizzle, thanks!

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน +1

      We're glad you found it helpful!

  • @srijonp4
    @srijonp4 9 หลายเดือนก่อน +5

    Nice, I am going to try drizzle now.

  • @siyedyoussef3202
    @siyedyoussef3202 9 หลายเดือนก่อน +4

    very informative video and on the target 🎯 love too see more of this types of videos

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน

      We're glad you found it helpful!

  • @VincentFulco
    @VincentFulco 9 หลายเดือนก่อน +3

    very cool and practical. Thanks!

  • @marta84-k5i
    @marta84-k5i 8 หลายเดือนก่อน +1

    thank you, this was a nice one, hope there is another how relationships works in drizzle, tyy

  • @haydonge5328
    @haydonge5328 3 หลายเดือนก่อน +1

    lots content for drizzle have been changed. Hope to update it with learning course.

  • @javierfuentesmora1814
    @javierfuentesmora1814 7 หลายเดือนก่อน +5

    do you need to close the db connection ?

  • @JissJoy-zt1is
    @JissJoy-zt1is 5 หลายเดือนก่อน +1

    Great stuff! It was really informative. I had a slightly different question. 😅
    The editor folder icons and theme, which extension are you using? I really liked em!
    Would be glad if you could share it.

  • @anirudhsinghbhadauria4034
    @anirudhsinghbhadauria4034 9 หลายเดือนก่อน +4

    Nice file management!

  • @eliuddyn
    @eliuddyn 9 หลายเดือนก่อน +2

    Amazing 🔥🔥

  • @abhinasregmi9742
    @abhinasregmi9742 7 หลายเดือนก่อน +1

    You look so happy 😊 😊

  • @omkar._.k
    @omkar._.k 9 หลายเดือนก่อน +2

    Hello Neon
    I just wanted to know something. When I generat a new db migrations like you showed it at 4:37 , it is not accepting the syyntax of sql file . I have installed postgres correctly and also not missing any steps in dependencies. Using VS Code . I hope you can help with a reply!!

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน +1

      Hey!
      > it is not accepting the syyntax of sql file
      Do you mind sharing more details? What kind of issues are you running into? What's the error message?

  • @TristanRemy
    @TristanRemy 9 หลายเดือนก่อน +1

    Awesome content! Just one question which might look stupid : in your package.json, why use bun for migrate/seed and bunx for format/lint with biome being a devDependency ?

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน +1

      Not stupid at all! This is how it's recommended to use in the Biome docs
      biomejs.dev/guides/getting-started/#usage
      The package is installed in the project so that the editor can format on save. I like including it in the project so that if someone clones the repo they can easily get up and running
      - Mahmoud

  • @carlotadias9335
    @carlotadias9335 หลายเดือนก่อน

    great video
    thank you 😊😊😊😊😊😊😊😂😂

  • @mdsalahuddin2841
    @mdsalahuddin2841 9 หลายเดือนก่อน +1

    how can we retrieve large scale json file generated from application like excalidraw ?

  • @raine-works
    @raine-works 5 หลายเดือนก่อน

    What theme and icons are you using for VSCode?

  • @LarsRyeJeppesen
    @LarsRyeJeppesen 9 หลายเดือนก่อน +1

    Great stiff. How to deal with mysql pools for i stance? Does drizzle open amd close a connection fir each request?

    • @neondatabase
      @neondatabase  8 หลายเดือนก่อน

      Drizzle doesn't automatically handle the opening and closing of connections for each request. This needs to be handled by the developer, which depends on which database driver they're using

    • @LarsRyeJeppesen
      @LarsRyeJeppesen 8 หลายเดือนก่อน

      @@neondatabase yes thanks I saw now, using mysql2 pool connection. Loving this ORM

  • @faizanhaider
    @faizanhaider 8 หลายเดือนก่อน +3

    Coming from #fireship 😉

  • @abhisekdas9976
    @abhisekdas9976 6 หลายเดือนก่อน

    What vscode icon pack are you using?

  • @mouradbougarne1162
    @mouradbougarne1162 8 หลายเดือนก่อน

    I tried to ask on their Discord server but no answer.
    Does drizzle support add unique constraint based on two columns? `To make a column unique only based on another column, a playlist title is unique per user ID.

  • @tradecate
    @tradecate 8 หลายเดือนก่อน

    If I use neon branches, do I still have to create migrations? Planetscale explains that branches negate migrations so use db push instead of db migrate (for prisma)

    • @neondatabase
      @neondatabase  8 หลายเดือนก่อน

      Neon doesn't manage migrations for you as of today. So you will need to write them (or generate them depending on your framework of choice) and apply them in a Ci/CD pipeline or before your project's build step.
      Merging branches is something we're thinking about. But we don't have an exact ETA
      - Mahmoud

  • @etj1237
    @etj1237 3 หลายเดือนก่อน

    Please Please Please tell us what theme and icon pack you're using !!!! 🙏🙏🙏🙏🙏

    • @neondatabase
      @neondatabase  3 หลายเดือนก่อน +1

      GitHub Dark default (theme) + Symbols (icons)
      - Mahmoud

  • @asadmehboob1300
    @asadmehboob1300 9 หลายเดือนก่อน

    please help me to generate generic repository pattern using drizzle or dynamic query

  • @sudiptapaul278
    @sudiptapaul278 8 หลายเดือนก่อน

    export const db = drizzle(sql)
    This line is showing me the error: "Argument of type 'NeonQueryFunction' is not assignable to parameter of type 'NeonQueryFunction'.
    Types of property 'transaction' are incompatible.

    • @hamzasaleem2
      @hamzasaleem2 8 หลายเดือนก่อน

      const sql: NeonQueryFunction = neon(process.env.DATABASE_URL);
      this will fix it!

  • @WorkerThreads
    @WorkerThreads 9 หลายเดือนก่อน +1

    What is ide ?

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน +2

      GitHub Dark theme + the "Symbols" icons extension
      - Mahmoud

  • @linodil
    @linodil 9 หลายเดือนก่อน +1

    Why did you choose Hono over Elysiajs. Elysia has been longer in the game and is faster than Hono.

    • @neondatabase
      @neondatabase  9 หลายเดือนก่อน +1

      No reason is in particular. Both are awesome!
      - Mahmoud

    • @jitxhere
      @jitxhere 9 หลายเดือนก่อน

      Hono can be deployed to like Workers, Vercel, Node.js etc.... Elysia main focus is bun right and also it is new right?? Also does any hosting support it??

  • @hakuna_matata_hakuna
    @hakuna_matata_hakuna 5 หลายเดือนก่อน

    no local dev?

  • @Don78395dherre
    @Don78395dherre 2 วันที่ผ่านมา

    Wtf you are already been write the code qnd explaining them , why don't you write the code and explain that during video

  • @carlotadias9335
    @carlotadias9335 หลายเดือนก่อน

    hello, I have this config
    import { defineConfig } from "drizzle-kit";
    export default defineConfig({
    schema:"./src/db/schema.ts",
    out: "./src/db/migrations",
    dialect: "sqlite",
    driver: "d1-http",
    strictNullChecks : true,
    strict: true,
    dbCredentials: {
    url: "file:./src/db/sqlite.db",
    },
    });
    And I'm having the error in the url inside of the dbCredentials :
    Object literal may only specify known properties, and 'url' does not exist in type '{ accountId: string; databaseId: string; token: string; }'.ts(2353)
    (property) url: string
    Any idea on what can be wrong ??
    Thank you in advance,