I'm trying to use the query!
macro family in sqlx
. This gives errors starting with
error: set `DATABASE_URL` to use query macros online, or run `cargo sqlx prepare` to update the query cache
Yes, sqlx-cli
is installed. If I follow the suggestion and run cargo sqlx prepare
, I get an error with the same line at the top. In summary, the error message implies that you need to run cargo sqlx prepare
before you can run cargo sqlx prepare
.
It does manage to create an empty .sqlx
directory.
The behaviour is the same with sqlx-cli
versions 0.7.4 and 0.8.2.
Any ideas?