←back to thread

873 points belter | 3 comments | | HN request time: 0.231s | source
Show context
cies ◴[] No.42946912[source]
> ORMs are the devil in all languages and all implementations. Just write the damn SQL

This week wrote an article on this, since I found there's a lot to explain wrt this topic:

https://dev.to/cies/the-case-against-orms-5bh4

On HN:

https://news.ycombinator.com/item?id=42922014

replies(1): >>42947249 #
MisterKent ◴[] No.42947249[source]
I've been loving edgedb in my typescript side projects for a number of years now. I have always hated ORMs, mostly for performance and a little bit for elegance / ergonomics. Curious if you have thoughts on a solution like that?
replies(1): >>42947845 #
1. cies ◴[] No.42947845[source]
I like EdgeDB. The only downside I see is the lock-in, that is less of an issue with SQL.

While I have not used EdgeDB, I have used Hasura, which I really liked.

Wrt the syntax of queries, I know of https://prql-lang.org which is kind of similar of EdgeQL.

Funny that EdgeDB says on its page it tries to solve the ORM problem: I strongly believe ORMs do not solve any problem, they merely create problems (as I argue in the linked article).

Wrt my thoughts: the EdgeQL queries are usually still strings (no compile time type checking, not IDE tooling). With Hasura the GraphQL interface (that EdgeDB also supports) allows one to generate a client library based on the GraphQL schema: this allows one to have compile time checks on the queries, which is really neat.

replies(2): >>42949727 #>>43078831 #
2. cluckindan ◴[] No.42949727[source]
If you like GraphQL and are looking at databases, try Dgraph community edition some day.
3. MisterKent ◴[] No.43078831[source]
This is days old, but edgedb does allow generating a fully typesafe query builder package that is schema aware. At least for typescript, I haven't tried it with other languages yet.

Edgedb ends up being an extremely performant ORM if used that way. And since your database is fully aware of your object graph, it's just as or more type safe than graphql.