Re:Don't use your ORM entities for everything – embrace the SQL
by internetter on Friday March 29, 2024 @12:43PM
(#39866124)
We use Kysely[0], which is a nice balance. The code you write in Kysely translates 1:1 into SQL, which means there's very little perf left on the table, but we get an interface that's automatically typed, type safe, and works well with our js language tools.
[0]: https://kysely.dev/
It's funny that the same developers that try to avoid vendor lock-in don't realize they've locked themselves into an ORM forever.
Plus, SQL isn't that hard. And as a backend person, you should be able to visualize your data model anyway. A SQL datatbase is just a bunch of planes, for the most part, and the queries are how you intersect them...more or less.