2 ms·
Whilst I love the idea of SQLX compile-time checked queries it is not always practical to need a database connection to compile the code in my experience. If it
by seddonm1 2y ago
Whilst I love the idea of SQLX compile-time checked queries it is not always practical to need a database connection to compile the code in my experience. If it works for you then thats great but we had a few tricky edge cases when dealing with migrations etc.
Also, and more fundamentally, your application state is the most valuable thing you have. Do whatever you feel makes you most comfortable to make sure that state (and state transitions) is as well understood as possible. rusqlite is that for me.
- pdimitar 2y agoThank you, good perspective. Weren't the compile-time connections to DB optional btw? They could be turned off I think (last I checked, which was last year admittedly). My question was more about the fact that sqlx is integrated with tokio out of the box and does not need an extra crate like rusqlite does. But I am guessing you don't mind that.
- seddonm1 2y agoSQLX has an offline mode where it saves the metadata of the SQL database structure but then you run into risk of that being out of sync with the database? Yeah I just drop this one file [0] into my Tokio projects and I have a SQLite with single writer/multi reader pool done in a few seconds. [0]: https://github.com/seddonm1/s3ite/blob/0.5.0/src/database.rs https://github.com/seddonm1/s3ite/blob/0.5.0/src/database.rs
- pdimitar 2y agoThanks again! I'll be resuming my effort to build an Elixir <-> Rust SQLite bridge in the next several months. Hope you won't mind some questions.