|
|
|
|
|
by tmpfs
324 days ago
|
|
I have used this as well as many of the other lower-level db drivers (which don't check your SQL at compile time) and I can say I much prefer the latter. My issues with SQLx when I first tried it were that it was really awkward (nigh impossible) to abstract away the underlying DB backend, I expect those issues are fixed now but for some simple apps it's nice to be able to start with SQLite and then switch out with postgres. Then I wanted to dockerize an SQLx app at one point and it all becomes a hassle as you need postgres running at compile time and trying to integrate with docker compose was a real chore. Now I don't use SQLx at all. I recommend other libraries like sqlite[1] or postgres[2] instead. SQLx is a nice idea but too cumbersome in my experience. [1]: https://docs.rs/sqlite/latest/sqlite/
[2]: https://docs.rs/postgres/latest/postgres/ |
|
[1]: https://docs.rs/sqlx/latest/sqlx/macro.query.html#offline-mo...