Open
Description
Some of the queries in api/src/db/database.rs
are very large which makes them hard to read.
We should use sqlx::query_file!
macro and move large queries to separate files in api/src/db/queries/
.
One drawback is that we will need to specify them as sqlx::query_file!("api/src/db/queries/<query_name>.sql")
which will not make them clickable, but it's probably still better.
Once we do that, we should set up SQL formatting as well (eg. https://github.com/dprint/dprint-plugin-sql).