3 ms·
While we're on the subject of ORM's I really like the https://github.com/cornucopia-rs/cornucopia https://github.com/cornucopia-rs/cornucopia way of doing thing
by ianpurton 4y ago
While we're on the subject of ORM's I really like the https://github.com/cornucopia-rs/cornucopia https://github.com/cornucopia-rs/cornucopia way of doing things.
Basically write SQL in a file and code generate a function that runs the SQL for you and puts it into a struct (this one is for rust)
I think there's a library to do the same thing with typescript.
For me, the best way to talk to the database is with SQL and I don't have to learn an ORMs way of doing it.
- TN1ck 4y agoI used sqlc[1] for golang, while it’s very cool and keeps things simple, at the end I switched to gorm as I needed hooks and dynamic queries where annoying to write. I could have build these things myself on top, but that would have been a homegrown orm in the end. But as every orm, gorm also has its problems, pick you poison. [1] https://sqlc.dev/ https://sqlc.dev/