Hacker News new | ask | show | jobs
by fiedzia 608 days ago
>The second that you would benefit from using a DBMS specific feature, the ORM begins getting in the way.

You can extend diesel (and probably many other orms, Diesel is just particularly easy here) to support any db feature you want.

> It is highly unlikely that an ORM provides support, much less a good abstraction, over features that only 1/N supported DBMS have.

That depends on orm flexibility and popularity. It may not provide support OOTB, but can make it easy to add it.

> Your code ends up using the driver raw in these cases, so why not just use the driver for everything? Your codebase would be consistent at that point

Main point of using orm for me is that I have type verification, raw (as in text) breaks too easily.

1 comments

You can extend diesel in theory, but can you really in practice? In my experience, it's very hard to work with once you get into the weeds. It's a big mess of very complicated generic signatures.

Might have improved since last I checked, but I was pretty confused.

I've added some sql functions, and support for decimal type for mysql (It didn't have it at some point). Wasn't complicated.