3 ms·
sqlx is my favorite way of working with databases in Rust hands down. I've tried alternatives like Diesel and sea-orm. To be honest, I feel like full-blown OR
by Ameo 1y ago
sqlx is my favorite way of working with databases in Rust hands down.
I've tried alternatives like Diesel and sea-orm. To be honest, I feel like full-blown ORMs really aren't a very good experience in Rust. They work great for dynamic languages in a lot of cases, but trying to tie in a DB schema into Rust's type system often creates a ton of issues once you try to do anything more than a basic query.
It's got a nice little migration system too with sqlx-cli which is solid.
- p4ul 1y agoThis has been exactly my experience! I've found SQLx to be a joy to work with in Rust!
- WD-42 1y agoSame. Never again diesel. The type system just turns it into madness. Sqlx is a much more natural fit.
- deleted 1y ago[deleted]
- theOGognf 1y agoI’ve used Diesel for a bit now but haven’t had issues wrangling the type system. Can you give an example of an issue you’ve encountered?