#Best ORMs for Ts?
30 messages · Page 1 of 1 (latest)
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
✅Marked as resolved by staff
use raw stuff like postgres.js
No, thanks. I would like to keep my sanity for now
Surely there is some ORM that has good performance
Pretty sure drizzle merely uses whatever driver you give it
Drizzle is not fast. Drizzle doesn't slow you down
You'll always lose performance over raw queries with ORMs. The trade-off is better dev management and code structure.
I'm aware of this, though I was looking for an ORM that didn't add much overhead because prisma adds a ton. Some people suggested TypeORM though from what I've seen it's not in a good state right now
can't really see how drizzle that's barely an orm has as much overhead as prisma (also there's some fancy list of limitations when you plug drizzle into prisma, but that's besides)
also, do you really need that much performance?
if you're looking for best performance an orm isn't the best pick
Prisma does have a raw method
bypasses their engine and submits the query directly to the database
You just need to build the query manually
yeah but if you're going to do that, at that point you're not using it as an orm
and you could just use a query builder
eg kysely
Depends on the query. I can see why an ORM is good for repeatable querys like fetching user data based on ids. But doing lots of joins and union most ORMs struggle with.
prisma apparently just can't even
(per the limitations drizzle lists)
they have recently improved their performance
I'm not saying an orm isn't good, I use prisma myself, but if one of the requirements is best performance then maybe they can reconsider
you could use kysely and wrap it on a repository
This does seem like a very nice alternative. I will consider it. Thanks a lot
I don't need insane amounts of performance, but I also don't want prisma's overhead. The way their query engine communicates with the client & the fact that you have to download specific ones based on your OS has gotten very annoying
I know they said that they'll be doing a ts port of the engine but I'd rather migrate to something else than wait for that. After all, with ORMs you tend to build your app around them, not with them
I tried kysely (more specifically prisma-kysely since I like prisma's schema language). I think it's probably the best way to interact with your db so far while maintaining decent performance and harnessing the power of raw sql
This isn't really a spot for empty opinions like that, and even more so almost a month after the original question was answered and resolved