Skip to content

Commit 51954fe

Browse files
authored
fix(readme): link to dotenv crate
closes #1405
1 parent ce801b9 commit 51954fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -358,12 +358,14 @@ Differences from `query()`:
358358
queries against; the database does not have to contain any data but must be the same
359359
kind (MySQL, Postgres, etc.) and have the same schema as the database you will be connecting to at runtime.
360360

361-
For convenience, you can use a .env file to set DATABASE_URL so that you don't have to pass it every time:
361+
For convenience, you can use [a `.env` file][dotenv] to set DATABASE_URL so that you don't have to pass it every time:
362362

363363
```
364364
DATABASE_URL=mysql://localhost/my_database
365365
```
366366

367+
[dotenv]: https://github.com/dotenv-rs/dotenv#examples
368+
367369
The biggest downside to `query!()` is that the output type cannot be named (due to Rust not
368370
officially supporting anonymous records). To address that, there is a `query_as!()` macro that is
369371
mostly identical except that you can name the output type.

0 commit comments

Comments
 (0)