4 ms·
I still don't understand why people believe that abstracting away something as important as your data store is a good idea. They quickly run into performance pr
by mannyv 3y ago
I still don't understand why people believe that abstracting away something as important as your data store is a good idea. They quickly run into performance problems that are quite difficult to fix.
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.
- internetter 3y agoWe 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/ https://kysely.dev/
- clarkdave 3y agoKysely is excellent! Another library that complements it is pgTyped[0]. It compiles .sql files into functions with strongly typed parameters and return values [0] https://pgtyped.dev/ https://pgtyped.dev/