Skip to content

Commit e7a50d3

Browse files
authored
Document Offline mode with feature flags (launchbadge#1665)
I ran into this and found the solution inside of this issue launchbadge#1593 Fixes launchbadge#1593
1 parent c90d271 commit e7a50d3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sqlx-cli/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,13 @@ variable to `true`.
126126

127127
If you want to make this the default, just add it to your `.env` file. `cargo sqlx prepare` will
128128
still do the right thing and connect to the database.
129+
130+
#### Include queries behind feature flags (such as queryies inside of tests)
131+
132+
In order for sqlx to be able to find queries behind certain feature flags you need to turn them
133+
on by passing arguments to rustc.
134+
135+
This is how you would turn all targets and features on.
136+
```bash
137+
cargo sqlx prepare -- --all-targets --all-features
138+
```

0 commit comments

Comments
 (0)