mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
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:
parent
c90d2714ff
commit
e7a50d3501
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue