Document Offline mode with feature flags (#1665)

I ran into this and found the solution inside of this issue https://github.com/launchbadge/sqlx/issues/1593
Fixes #1593
This commit is contained in:
Fredrik Park 2022-02-16 06:14:04 +01:00 committed by GitHub
parent c90d2714ff
commit e7a50d3501
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -126,3 +126,13 @@ variable to `true`.
If you want to make this the default, just add it to your `.env` file. `cargo sqlx prepare` will
still do the right thing and connect to the database.
#### Include queries behind feature flags (such as queryies inside of tests)
In order for sqlx to be able to find queries behind certain feature flags you need to turn them
on by passing arguments to rustc.
This is how you would turn all targets and features on.
```bash
cargo sqlx prepare -- --all-targets --all-features
```