4 ms·
> Worth noting: diesel definitely fulfills the "providing compile time guarantees" criteria. Also sqlx. I liked the article and I bookmarked the library but t
by pdimitar 2y ago
> Worth noting: diesel definitely fulfills the "providing compile time guarantees" criteria.
Also sqlx.
I liked the article and I bookmarked the library but this statement from the author confused me a bit. At least two libraries give you pretty good compile-time guarantees. sqlx even gives you the option to specify a DB where it can check whether your queries will succeed at runtime.
- weiznich 2y ago> Also sqlx. The guarantees provides by sqlx are less strong than what's provided by diesel due to the fact that sqlx needs to know the complete query statically at compile time. This excludes dynamic constructs like `IN` expressions or dynamic where clauses from the set of checked queries. Diesel also verifies that these queries are correct at compile time.