Closed
Description
A common source of outages is an incorrect query with no tests (#862, #829, #648, etc). While it's good to have tests for all queries, it's not always feasible (especially until #822 is fixed). SQLx offers that advantage that it can check all queries at build time without having to write a test for that specific query. It is also fully async (cc @Kixiron), although that might mean we have to wait until we switch to tokio 0.2.
To avoid needless database connections, this should only connect to the database when a query is changed or added, or a schema change is made: launchbadge/sqlx#249. During CI it should always connect to the database.