Why Prisma Might Not Be a Good Choice for Your Project

  Рет қаралды 53,237

Josh tried coding

Josh tried coding

Күн бұрын

Prisma is nice. I've used it in nearly all of my projects. But it's not good in every use case. The awesome DX comes with some large trade-offs I didn't even know about until I dug further into this topic. Chances are you didn't either.
-- my links
My GitHub: github.com/jos...
Discord: / discord

Пікірлер: 167
@SeanCassiere
@SeanCassiere Жыл бұрын
Prisma's DX is great! But as someone who's been shipping Drizzle for just over a month and a half now, I don't think I can go back. It doesn't even feel like an ORM, more like a lite wrapper around SQL.
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Interesting. Yeah, really does feel like that. They've positioned themselves uniquely in what I previously thought was a pretty saturated "market"
@isaacfink123
@isaacfink123 Жыл бұрын
I recently jumped on the drizzle train 2 things I miss from prisma, unique constraints and nested inserts
@furycorp
@furycorp Жыл бұрын
A wrapper around SQL that jails you from taking advantage of what your database is actually capable of. You might as well write real SQL. I rewrote one Prisma app to use slonik and the queries were much clearer about what they do and it was much smaller and tighter overall and a whole ton of work that went into working around Prisma's shortcomings got flushed.
@wandenreich770
@wandenreich770 Жыл бұрын
@@furycorp I find wrting real sql a challange especially with the lack of types and no migration support..how do you solve those issues?
@yurisoares2596
@yurisoares2596 8 ай бұрын
@@wandenreich770 Wrapping them in functions, then declare the params with the types you want. You could also create a object with methods for each table, if your application is a nest.js backend even better since you could pass those objects as DI. Though there won't be migrations, at least you will keep those typesafe.
@CorujaCareca
@CorujaCareca Жыл бұрын
Could you do a video explaining the full basics in Drizzle with Planetscale and Next Auth? That would be great!!! Thanks for you awesome content , it helps me a lot
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Thanks for your suggestion. Good idea also using next-auth, curious how that'll work
@heychazza
@heychazza Жыл бұрын
Definitely +1! Started diving into Nextjs land (coming from Laravel&Vue). I have it setup with prisma, but I’d love to migrate it to Drizzle, just unsure where to begin. Even if you converted the Vercel Postgres + NextAuth template
@allan_archie
@allan_archie Жыл бұрын
Opinion: The Prisma approach is really great. Great when you want to get things done.
@yousafwazir3167
@yousafwazir3167 Жыл бұрын
I’m going to stick with prisma, it’s easier and more developer friendly.
@joshtriedcoding
@joshtriedcoding Жыл бұрын
That's currently true. Looking forward to the future though, interested to see how things evolve
@jitxhere
@jitxhere Жыл бұрын
Yea but consider drizzle has not yet reached v1. I am sure they are working to improve DX
@joshtriedcoding
@joshtriedcoding Жыл бұрын
@@jitxhere Oh they are. Their dev team is super engaged.
@CppGod-kn3fy
@CppGod-kn3fy 2 ай бұрын
Yeah josh is part of drizzle team​@@joshtriedcoding
@awe_ayo
@awe_ayo Жыл бұрын
I love drizzle
@kicknate195
@kicknate195 Жыл бұрын
Drizzle is so seamless. It's a joy to work with imo
@Philopater-Phoneix
@Philopater-Phoneix Жыл бұрын
​@@kicknate195is it prod ready?
@albertszymanski7177
@albertszymanski7177 Жыл бұрын
MikroORM is another fantastic Node ORM. Despite its functionalities, it is being developed by just one guy Martin Adamek who does it almost philanthropically so it makes me appreciate the tremendous work he did for this project. I guess he applied for some kind Github funding the project was rejected. The only video about Mikro I remember is in Ben Awad's tutorial of LiRedit from I guess 2-3 years ago. I hope some youtubers will make videos about MikroORM and spread the word about it because I think it is worth it. It would be also great for the creator if he noticed much interest in the project on the internet. So Josh, I count on You :)
@mariuszszubryt1388
@mariuszszubryt1388 Жыл бұрын
I'm currently using MikroORM with NestJS and I must say it's truly impressive. It's surprising that it remains relatively undiscovered
@steadexe
@steadexe Жыл бұрын
I do use MikroORM with NestJS, probably the best ORM so far out there
@paschalokafor9043
@paschalokafor9043 Жыл бұрын
Please can someone explain to me what edge means?😢
@devinlauderdale9635
@devinlauderdale9635 7 ай бұрын
Lightweight functions that live on an "edge" network, which means geographically they they exist very close to users so this enables way faster load times...(and some other benefits)
@awisemanoncesaid12
@awisemanoncesaid12 Ай бұрын
@@devinlauderdale9635 thank you
@JS_Jordan
@JS_Jordan Жыл бұрын
I'm a free tier free loader and I love the dx of prisma. If my userbase out grows my free tiers I will move the tech over to more scalable solutions. Planetscale to AWS RDS, Vercel to AWS Amplify. I didnt know about it's querying costing more money so I really hope they can fix that soon. If they can fix it I will get more out of my free tier plans. There's a gap in the market here for a typesafe ORM that runs on the edge with a decent DX!
@wandenreich770
@wandenreich770 Жыл бұрын
🤣🤣🤣free stuff for life
@davidhavl
@davidhavl Жыл бұрын
I personally prefer MikroORM. It has everything Prisma does and more plus is battle tested.
@shu3684
@shu3684 Жыл бұрын
I thought i am the only one thinking like this
@albertointervento8555
@albertointervento8555 Жыл бұрын
Same, I wonder why MikroORM is not as popular as other Node ORMs. For me it is the only true ORM for Node as it really maps domain classes to Db tables which is not done by Prisma for example. I can not imagine writing larger projects with Prisma since I would have to write my own change tracker and data mapper in order to use domain-oriented approach.
@philheathslegalteam
@philheathslegalteam Жыл бұрын
@@albertointervento8555 Only in OOP do we have people creating solutions like data mappers and change trackers for problems OOP creates...
@nikolasburk
@nikolasburk Жыл бұрын
Hey Josh, thanks for another amazing and really informative video 😄 I work at Prisma and quickly want to react to a few of the things you've said in the video. First, regarding Edge Support in Prisma. If you're using the plain ORM, this is indeed not possible right now. However: - We are currently working on a solution to enable usage of Prisma ORM in Edge functions that will work even with the Rust-based query engine. We don't have a concrete timeline yet but expect some more news about this in the next few weeks/months 🎉 - It is still possible to use Prisma in Edge environments using Accelerate. Accelerate is an external connection pool (and also comes with an optional, global database cache) that you can use to proxy your DB connections from Edge functions. In fact, when deploying an application to the Edge, you'll want to use an external connection pool to ensure the scalability of your DB connections during traffic spikes. If you use Drizzle or another ORM without an external connection pool in Severless or Edge environments, you run the risk of exhausting your DB connections because each function instance will spawn a DB connection which in situations of high traffic will lead to the exhaustion of your DB connection limit. With an external connection pool, this problem is mitigated so using this external connection pool is the more sustainable architecture in the first place. We love your content at Prisma and are looking forward to more videos 😄💚
@marvelous812
@marvelous812 3 ай бұрын
He not replying your comment mean He clearly don't know about what you explain above . It's too technical tbh. 😂
@vickoalan
@vickoalan Жыл бұрын
Can you do a video explaining the full basics in Drizzle with Planetscale??? Please !
@greendsnow
@greendsnow Жыл бұрын
T3 stack is collapsing
@jannisstefanis9671
@jannisstefanis9671 Жыл бұрын
Always has been 🔫
@ShaunMcCready
@ShaunMcCready 3 ай бұрын
And what is replacing it as the new easy to setup stack?
@ikeako
@ikeako Жыл бұрын
The drizzle team moves so fast that this video is already out of date 😮 Their new relational query builder has DX that’s super close to prisma’s while only executing a single query.
@johnychinese
@johnychinese Жыл бұрын
Honestly just learn squeel and use mysql2
@jrdn5206
@jrdn5206 Жыл бұрын
Ah, did you use the last update? They added relational queries and other cool features to give prisma DX (or much closer). For us we do more complex queries and drizzle can do then all, it’s great
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Heard about it, sounds neat. Looking forward to where this is going
@DaveTheDeveloper
@DaveTheDeveloper Жыл бұрын
Drizzle is a step back in terms of dx. I hope prisma fixes its performance
@khaledsanny4817
@khaledsanny4817 Жыл бұрын
Yeah but you can just use the migration DX of prisma and the perfs of drizzle or whatever… what we need is a new JS library that uses syntax like prisma to perform migrations and convert it to typescript or generate typeorm entities or mongoose schemas 😂that would be great ngl
@agcodes
@agcodes Жыл бұрын
🗿
@toki.mp3
@toki.mp3 Жыл бұрын
There's library for prisma to kysely
@gosnooky
@gosnooky Жыл бұрын
I don't care about the edge. Apps run fast enough served from load-balanced VMs/EC2 instances. All this NextJS stuff just reminds me of PHP being both backend and frontend.
@lilililliilil
@lilililliilil Жыл бұрын
Prisma v5 is still f slow. I’ve started using Drizzle and it seems much faster than Prisma
@smotch7533
@smotch7533 Жыл бұрын
Gj josh, I think you missing comparing what drizzle does differently when it comes to performance after talking about what prisma does (wrong/different)
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Fair point
@zivtamary
@zivtamary Жыл бұрын
I've read somewhere that prisma is working on a solution to enable edge usage 🤔
@joshtriedcoding
@joshtriedcoding Жыл бұрын
That'd be very cool to see
@shakapaker
@shakapaker Жыл бұрын
What's wrong with TypeORM?
@_nikeee
@_nikeee Жыл бұрын
I started using Kysely recently and I'm pretty happy with it
@dechobarca
@dechobarca Жыл бұрын
+1 for Kysely, it's awesome, both as a library and performance wise!
@igalklebanov921
@igalklebanov921 Жыл бұрын
@nikeee @@dechobarca ❤from Kysely.
@YOitsBA
@YOitsBA Жыл бұрын
My issue with Prisma is that it won't attempt to reestablish a connection if the initial connection fails. For example, I have an API lambda that calls an Aurora cluster, but as soon as the cluster sleeps (to save money), Prisma will wake it up with a query, but that query also fails and Prisma never recovers even if on the next query the RDS is running. Still love it though 😂
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Interesting. Guess the severity of not recovering depends on your use-case, for some it might even be a deal breaker. Not sure if drizzle would do this either
@dukim632
@dukim632 3 ай бұрын
Title: Why Prisma Might Not Be a Good Choice Description: Prisma is nice. I've used it in nearly all of my projects i like youtube
@Luka_brx
@Luka_brx Жыл бұрын
prisma with kysely or drizzle and u are okay
@additionaddict5524
@additionaddict5524 Жыл бұрын
I didn’t deploy early and found out the hard way how awful Prisma is to deploy. Switched for drizzle and haven’t looked back. Dx isn’t as good but perf is amazing
@anubiseyeproductions2921
@anubiseyeproductions2921 Жыл бұрын
Had the same realization a while back and found EdgeDB. The performance benchmarks win and the dev experience is nice. Only works with Postgres though.
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Haven't heard of that before, glad it's been working well for you. Only supporting Postgres is not awesome but probably works just fine for most use cases
@toki.mp3
@toki.mp3 Жыл бұрын
Prisma getting a lot of push back, even I'm thinking moving to drizzle.
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Not sure if it's really push back, more so people realizing there ARE actually alternatives. I personally didn't even look for alternatives at all for the longest time, but now there's an option to switch
@toki.mp3
@toki.mp3 Жыл бұрын
@@joshtriedcoding true. I've been using prisma since forever. Ever since edge caught my attention I had to search for alternative. There's another player, hono, is doing good.
@robind9871
@robind9871 27 күн бұрын
Wouldn‘t the solution for the Prisma data fetching issue be to create views?
@omerpriel5588
@omerpriel5588 11 ай бұрын
For those who know SQL, sometimes clean SQL without ORM is better. Write a library that will contain the queries with validation and verification of the parameters. and return them in present form (interface \ tuple \ class). It's very efficient, it's intuitive, when you work correctly it's secure and it's easy to mock it for tests.
@victorferreira2742
@victorferreira2742 Ай бұрын
Why would someone use Prisma on a frontend application?
@ayoubmanar9205
@ayoubmanar9205 Жыл бұрын
what about Knex
@falkfrentzen4120
@falkfrentzen4120 Жыл бұрын
Take a look at EdgeDB and it‘s Query Builder. That thing is seriously fast. It also has every advantage a relational DB has plus the ones, a graph DB has.
@maaasyn8771
@maaasyn8771 Жыл бұрын
Worth to mention that drizzle recently added relational queries, which are pretty similar to prisma includes, expect that ts is super slow and requires more manual work to set up.
@maverick456-33
@maverick456-33 Жыл бұрын
Raw SQL is best !
@miigaarino
@miigaarino Жыл бұрын
does drizzle have cursors? has anyone tried it with graphql?
@toki.mp3
@toki.mp3 Жыл бұрын
No cursor
@BarisPalabiyik
@BarisPalabiyik Жыл бұрын
Prisma got unmatched DX, also with their Json protocol they trimmed down the binary, and building upon that. I would say, stay on the Prisma if you have no clients that demands ultra snappy stuff, urgently. However always for the competition. Drizzle with planetscale query thingy is super snappy, and planetscale is bringing "foreign key constraint" finally, so great things ahead.
@andrewsherman4610
@andrewsherman4610 Жыл бұрын
rust binary is still there
@toki.mp3
@toki.mp3 Жыл бұрын
Bruh! They got rid of graphql stuff from the binary. It's lighter now but still the binary is huge.
@BarisPalabiyik
@BarisPalabiyik Жыл бұрын
@@andrewsherman4610 yeah, my bad, couldn't remember the scope of the new protocol as I was writing. Thanks.
@dileepa-mn2to
@dileepa-mn2to 4 ай бұрын
can you make a video about drizzle
@WolfrostWasTaken
@WolfrostWasTaken Жыл бұрын
What about Prisma with MongoDB using type annotations? No need to use JOINs (in most cases, when the relation isn't 1 to millions) because the array is embedded in the document. No edge compatibility is completely fine for REST APIs that do not need it
@Luka_brx
@Luka_brx Жыл бұрын
Drizzle works only with sql dbs and it is still earley
@Luka_brx
@Luka_brx Жыл бұрын
Why would u even want to use mongo db with prisma?
@WolfrostWasTaken
@WolfrostWasTaken Жыл бұрын
@@Luka_brx it's fully supported by prisma and it allows me to avoid using mongoose, which has terrible TypeScript support afaik
@joshtriedcoding
@joshtriedcoding Жыл бұрын
@@WolfrostWasTaken Using prisma with mongo is a great use case
@siya.abc123
@siya.abc123 Жыл бұрын
I've been looking at drizzle it's great. The only thing is next auth doesn't have an adapter yet.
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Ahh that's not good. Pretty sure writing these adapters is not rocket science but it would be neat if there was one
@TheGamingMaik
@TheGamingMaik Жыл бұрын
For JS BBF Projects with a DB that only connects to this one app/projects drizzle might excell. But I work in a Microservice, Schema first environment. I don't want to create a schema in every service, I want to do db-schema as a ssot. And for anything that doesn't rely on performance as much like sync jobs, im-/exports and research I still prefer the ease of db pull and the overall DX. I see that Drizzle has a big advantage by running on edge and it certainly is better for that specific usecase. But generally I don't see why people call Prisma dying. I don't even consider them rivals...
@dechobarca
@dechobarca Жыл бұрын
In Prisma, the concept of "joins" simply does not exist. This is one of the first thing I learned when I was researching into it some time ago. So no matter what you do, at the end of the day you're making separate queries to the database, and Prisma is just "gluing" them together, which is obviously going to impact performance negatively, especially if you're working with a lot of data. So many tech related influencers (even those that I deeply respect) promote Prisma, but almost never mention about these drawbacks, so thanks for bringing awareness. I'm not saying it's a bad product, but you should know what you're getting yourself into. Personally I'm using Kysely right now, and I couldn't be happier.
@philheathslegalteam
@philheathslegalteam Жыл бұрын
Prisma + kysely is a godlike combo
@dechobarca
@dechobarca Жыл бұрын
@@philheathslegalteam In what exact way it would make sense to use Prisma + Kysely?
@philheathslegalteam
@philheathslegalteam Жыл бұрын
​@@dechobarca This is a lengthy one but I'll go over the advantages: 1. No migration runner beats Prisma in terms of DX to date. 2. Prisma schema is parseable into AST for Rust, TS, Golang etc using generators. 3. Prisma's DB push is incredible when iterating on development databases and branches. Now for Kysely. You add a custom generator to take Prisma's AST into Kysely generated types. Now you plug kysely into any ts system you want and use that exclusively. This way Prisma acts as the single source of truth, yet it performs no data operations except for migrations. Bonus (Edge runtimes): Use Prisma as the schema `prisma-kysely` as the AST parser `kysely-neon` or `kysely-planetscale` for edge DB drivers Now you can use your Kysely instance in edge functions as well. Make sure to make these functions regional to the database hosting location too. This process takes 15 minutes of setup time and saves hours in migration time.
@dechobarca
@dechobarca Жыл бұрын
@@philheathslegalteam Appreciate the in-depth explanation, thanks a lot. You're basically taking the parts which Prisma does well, while leaving the ones where it struggles out and let Kysely handle that. I haven't worked much with Prisma as I mentioned, but it might be a good option to use for migrations exclusively, provided I also define my schemas with Prisma (currently using SQL + kysely-codegen for that).
@igalklebanov921
@igalklebanov921 Жыл бұрын
@@philheathslegalteam ❤from Kysely.
@maxxflyer
@maxxflyer 10 ай бұрын
🎯 Key Takeaways for quick navigation: 00:14 🔄 *Prisma's architecture involves a query engine written in Rust, which adds complexity to the data retrieval process.* 01:23 💡 *Prisma has benefits like intuitive schema declaration but is inefficient in handling data queries, especially with SQL joins.* 02:30 🌐 *Prisma lacks Edge compatibility due to the large size of the Rust binary used in the query engine.* 03:13 🔍 *Drizzle ORM offers Edge compatibility and more control but may require SQL knowledge and has a more complex setup compared to Prisma.* 05:07 ⚖️ *Consider using Drizzle if you value Edge compatibility and are comfortable with SQL, even though it may not provide the same developer experience as Prisma.* Made with HARPA AI
@SamHartmannCom
@SamHartmannCom 10 ай бұрын
why not just use mongodb right away?
@vinaykumarkharwar177
@vinaykumarkharwar177 7 ай бұрын
yes. that what I was saying.
@dylan-roberts
@dylan-roberts Жыл бұрын
I wonder if Prisma will make the move into edge given the large push for it recently. I also wonder how that would affect the dynamic here.
@fieryninja2374
@fieryninja2374 Жыл бұрын
If Prisma does, then it would be the #1 choice no doubt.
@amanryder8380
@amanryder8380 5 ай бұрын
They just did !
@yurisoares2596
@yurisoares2596 8 ай бұрын
That query engine has 15mb built with RUST, pretty heavy.
@peter042
@peter042 Жыл бұрын
Hey Josh, Currently I'm doing your realtime chat app tutorial. It's awesome by the way. My question is, what tech stack do you suggest for me to use for my project? I tell you specific datas, thank you if you could help me. About me: I'm in the technologies you make your tutorials about, I saw almost every video of yours. About the project: it's a social media orientated around dopamine detox and connecting with people in the same interest. Monthly 10$ subscription. People can save notes on client side and on the server, then share it. And there are groups of people, called tribes. Tribe members can gain coins to their articles they published. Like that they can compete with each other. I want to make everything realtime, to serve the best user experience. Everything fast, everything realtime I can make. Like in your 8 hour tutorial, I'm really a fan of it. But should I use the same stack you use in the tutorial? Would you recommend something else? Like Drizzle? Because there are moderators and default users. And also tribe leaders, tribe helpers and default tribe members. And coin donation to articles. Oh yeah, when talking about realtime I mean like chat, I know how to do this, but I want to make realtime the coin donation with an animation, the comment section and the default data changes like comment, watch count on posts. Thanks if you red this until there. If you forgot (because I did), the question was: what technologies should I use for this?
@joshtriedcoding
@joshtriedcoding Жыл бұрын
I don't think there is a "should" in what technologies to use. I personally would still use prisma for this use-case and potentially migrate to drizzle later on. Pusher for realtime would make sense, stripe is the easiest way to get payments up and running. Depending on how large a note can be, I'd either suggest s3 (large notes) or storing those in db directly (small notes).
@peter042
@peter042 Жыл бұрын
@@joshtriedcoding thanks for the answer! I'll tell you about the project later. And I'll mention your channel at the thanksgiving part
@joshtriedcoding
@joshtriedcoding Жыл бұрын
@@peter042 Cheers dude. Wish you all the best for this project
@abdullah_siddiquii
@abdullah_siddiquii Жыл бұрын
Hey dude as we know that appwrite hackathon is going on. Can you please make a vedio on appwrite cloud function that trigger on when user authenticated for the first time to store that user in the appwrite database. Please make vedio soon before the hackathon ends.🙁
@CecepBudiman
@CecepBudiman Жыл бұрын
hmm i dont think those tradeof is good reason to switch prisma to drizzle, because if you are really need performance in prisma, you can do it by using the raw queries and it is also secure too not to mention their transactions api which is good, prisma also made you deploy faster because the easiness of prisma schema and the orm. and also serverless is suck on both things because the cold boot, have you seen amazon prime is switching to monolithics? so if you are just starting a small to medium projects and need to deploy fast use prisma. setting up db youself is so easy this day using dockers.... so you dont need to pay planetscale or aws or gcp shit
@hakuna_matata_hakuna
@hakuna_matata_hakuna Жыл бұрын
Haven't even watched the video and can predict it's something about using drizzle , they hype machine lives on . I'd bet some of these new hyped up tools are paying for attention
@Jjjabes
@Jjjabes Жыл бұрын
Am I missing something?.. surely edge hosting for an ORM is irrelevant unless you are replicating multiple DBs, as your ORM regardless of choice still needs to make connections to a DB that's not on the edge.
@123159antonio
@123159antonio Жыл бұрын
Waiting for the full tutorial :) Love your content
@asimalqasmi7316
@asimalqasmi7316 Жыл бұрын
Yes, I saw the Codedamn video I felt sorry for them Thanks for the solution
@MsLadyanimai
@MsLadyanimai 5 ай бұрын
Ok so which app for beginners is best to use ok a android phone , because that's why i have idea
@Mixesha001
@Mixesha001 Жыл бұрын
MikroORM battle & prod tested ORM, on the edge Drizzle is also very cool.
@weilieschok4468
@weilieschok4468 Жыл бұрын
I am currently evaluating an architecture that work best for API, prisma sounds greate coz the API call could jz call directly backend by prisma and return result in JSON. But I don't see such feat in drizzle, which everything is in script instead of JSON. Correct me if I am wrong. Do recommend me if u know any package do that 😊 thanks pal
@Badis-n2u
@Badis-n2u 8 ай бұрын
Man , how you do that ?l leearning everything arround there , we need focus not hip hip hip
@yxgen4
@yxgen4 Жыл бұрын
seems very similar to SupabaseJS
@vommir.
@vommir. Жыл бұрын
Any upcoming tutorials for Drizzle? Thank you for the video.
@gopallohar5534
@gopallohar5534 3 ай бұрын
Drizzle has an engine or it's just a sql query generator?
@walkingin6375
@walkingin6375 Жыл бұрын
2:11 actual gif of me bug fixing the error on line 64 in my 43 line component.
@amanryder8380
@amanryder8380 5 ай бұрын
Prisma just made the move into edge last month !
@koruko634
@koruko634 Жыл бұрын
I recently migrated from prisma to drizzle and I really liked it, honestly it didn’t bother me how tricky it is to setup and push migrations to planet scale but it was fun
@jitxhere
@jitxhere Жыл бұрын
can you share how. I am unable to figure it out
@koruko634
@koruko634 Жыл бұрын
@@jitxhere Yeah sure, you will need to install a specific drizzle-kit package which is "drizzle-kit": "0.17.6-76e73f3", then you will be able to run this command "drizzle-kit push:mysql --config drizzle.config.ts", that's all, now you can push your schema to planetscale from command line, or you make a script like this, "db:push": "drizzle-kit push:mysql --config drizzle.config.ts", so you can run it through yarn, npm, pnpm
@joshtriedcoding
@joshtriedcoding Жыл бұрын
@@jitxhere I couldn't get the drizzle config to work for some reason. If you somehow have the same problem, you can specify your command in the package.json with the outdir directly. That's going to generate your SQL migrations just fine
@jampy42
@jampy42 Жыл бұрын
Sadly there's still no adapter for next-auth with drizzle :(
@heyl_yt
@heyl_yt Жыл бұрын
It seems like Supabase with it's built-in migration tool is in the middle of those two. SQL scripts similar to Prisma and TS types generated from CLI (or web UI) seems match almost every use case. - Happy Supabase user since few months
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Nice dude. Does Supabase also offer type safety for your database?
@philheathslegalteam
@philheathslegalteam Жыл бұрын
@@joshtriedcoding It does offer type safety but only full types. So say you select only "name" from a table with 5 other columns, Supabase gives you 5 in typescript, but its only "name" in runtime. There are open PR's for a typesafe client (using typescript template literal parsing), but its not there yet.
@joshtriedcoding
@joshtriedcoding Жыл бұрын
@@philheathslegalteam Interesting, I guess you could fix that manually using TypeScript utility types. A fully typesafe client would be awesome tho
@philheathslegalteam
@philheathslegalteam Жыл бұрын
​@@joshtriedcoding You definitely could. I have to correct myself though! It's been a while since I've used the supabase client, and it looks like they have fixed their types problem. They managed to implement that string literal parsing I was talking about, so a string of "id, email" will be parsed, split into "id" | "email" and sent through the Pick operator. I am curious if it works with their join syntax as well. Will try it out and get back to you :)
@HimanshuGogoi
@HimanshuGogoi Жыл бұрын
I have heard that supabase is comparitvely more costly when it scales. Is that true?
@manjime
@manjime Жыл бұрын
prisma data proxy kind of resolve the the edge issue
@granporculio
@granporculio Жыл бұрын
TypeORM is the best
@filipjnc
@filipjnc 11 ай бұрын
Unmaintained, bugged hell.
@igalklebanov921
@igalklebanov921 Жыл бұрын
Kysely still loves ya, even if you didn't mention it.
@anthonymann7679
@anthonymann7679 Жыл бұрын
I think its worth learning drizzle even for a biginner, especially givin how useful it is to have at least a basic idea of how to write SQL
@samajad1
@samajad1 Жыл бұрын
Drizzle feel like laravel elequent
@MrAtomUniverse
@MrAtomUniverse Жыл бұрын
Time to go back to laravel then
@samiullahsheikh5015
@samiullahsheikh5015 Жыл бұрын
what is your opinion about TypeORM?
@13odman
@13odman 10 ай бұрын
I believe they added edge support
@jitxhere
@jitxhere Жыл бұрын
Josh can you please share how to connect drizzle orm with planetscale. I can connect with mysql but facing error while using planetscale
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Yeah it's not as straightforward as I expected when getting into it. You're not the only one asking this, thanks for the video suggestion
@shayanalijalbani9894
@shayanalijalbani9894 Жыл бұрын
What about firebase
@man_kind
@man_kind 7 ай бұрын
What is edge?
@disinfect777
@disinfect777 Жыл бұрын
I write my own SQL. Never really bothered with ORMs.
@joshtriedcoding
@joshtriedcoding Жыл бұрын
The main benefits of an ORM are to save you time, increase maintainability, and provide the same syntax even across multiple DBs. But glad to hear just doing everything yourself is working for you
@najmulhasan5997
@najmulhasan5997 Жыл бұрын
Make a project please
@nguyenvunghiem460
@nguyenvunghiem460 Жыл бұрын
luv u
@LearnByDoing7
@LearnByDoing7 Жыл бұрын
Josh is amazing 👏
@wandenreich770
@wandenreich770 Жыл бұрын
what about speed in terms of fetching compared to prisma?
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Drizzle tends to be faster, especially since you can also prepare the queries so the query strings do not need to be recalculated while the lambda is warm
@wandenreich770
@wandenreich770 Жыл бұрын
@@joshtriedcodingnice
@mearshadaman
@mearshadaman Жыл бұрын
Josh you are awesome, I am addicted to your channel... I keep sharing your videos
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Appreciate ya man. Cheers
@boopfer387
@boopfer387 Жыл бұрын
dumb question, why exactly use an orm if u can write sql? cause we want the code first approach?
@SWAGER1811
@SWAGER1811 8 ай бұрын
Honestly, I m also curious. Why not use an sql library to connect and call queries directly?
@mohitcodeswell
@mohitcodeswell Жыл бұрын
Hey Josh please try making tutorials as a series, it will work a lot for people like me
@joshtriedcoding
@joshtriedcoding Жыл бұрын
Probably not going to make a series because tuning in to any video other than literally the first part is very off-putting. Instead I think longer-form videos where everything is in a single video work better for most people
@mohitcodeswell
@mohitcodeswell Жыл бұрын
@@joshtriedcoding aaahh! Maybe that's why we subscribe to you josh. Nice key point.
@sleekism
@sleekism Жыл бұрын
Isn't the "Edge runtime" Vercel-specific? I feel people might be confused into thinking you're referring to edge deployments that are close to the user
@invinciblemode
@invinciblemode Жыл бұрын
Edge runtime is based on the WinterCG spec which is platform agnostic
@sleekism
@sleekism Жыл бұрын
@@invinciblemode yeah but that's a spec, the runtime itself is Vercel-specific. Edge runtime as defined by Vercel doesn't exist anywhere else. It means something very different on other cloud platforms
@mhadi-dev
@mhadi-dev Жыл бұрын
What about Typescript support?
@moibe182
@moibe182 9 ай бұрын
The problema about reading to tables happens only when joints in SQL are made or something similar could happen with document based tables like firebase or mongodb?
@raihan7422
@raihan7422 Жыл бұрын
Okay, it's finally the time for me to search on google "what is edge"
@iukeay
@iukeay Жыл бұрын
I am able to kinda run Prisma on the edge (total query, and network overhead around 93ms) server running on railway. Versel edge function same region. They recently made some changes to fix the whole cold start issue with it also
@blaizeW
@blaizeW Жыл бұрын
Drizzle is so cool, but, unfortunately, they only have SQL db support... Waiting for a version for no sql ones 🫶
Migration Lesson: Don't Use Prisma | Prime Reacts
29:16
ThePrimeTime
Рет қаралды 154 М.
Prisma - лучшая ORM для Node.js
23:45
PurpleSchool | Anton Larichev
Рет қаралды 31 М.
哈哈大家为了进去也是想尽办法!#火影忍者 #佐助 #家庭
00:33
БЕЛКА СЬЕЛА КОТЕНКА?#cat
00:13
Лайки Like
Рет қаралды 2,7 МЛН
DONT USE AN ORM | Prime Reacts
25:46
ThePrimeTime
Рет қаралды 230 М.
How to Manage User Roles in NextJS / NodeJS
12:11
Josh tried coding
Рет қаралды 112 М.
Drizzle vs Prisma: Which ORM is right for YOU?
5:59
Kodaps Academy
Рет қаралды 8 М.
Prisma Just Got a Lot Faster
6:50
Josh tried coding
Рет қаралды 34 М.
Why I Don't Use NextJS For My Side Project Anymore
6:51
Josh tried coding
Рет қаралды 71 М.
Do we really need firebase in 2023
10:47
Hitesh Choudhary
Рет қаралды 123 М.
Is Drizzle Really Better Than Prisma?
20:15
Web Dev Simplified
Рет қаралды 81 М.
Prisma Vs. TypeORM Vs. Sequelize | Which is Better?
12:44
PedroTech
Рет қаралды 32 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 413 М.
Learn Drizzle In 60 Minutes
56:09
Web Dev Simplified
Рет қаралды 67 М.
哈哈大家为了进去也是想尽办法!#火影忍者 #佐助 #家庭
00:33