docs: tweak quickstart fix PR for review comments

This commit is contained in:
Ryan Leckey 2020-12-18 21:29:38 -08:00
parent 3b80998801
commit 54011f1893
No known key found for this signature in database
GPG key ID: F8AA68C235AB08C9

View file

@ -172,7 +172,7 @@ sqlx = { version = "0.4.0", features = [ "runtime-async-std-native-tls" ] }
```toml
[dependencies]
sqlx = { version = "0.4.0-beta.1", features = [ "postgres" ] }
sqlx = { version = "0.4.1", features = [ "postgres" ] }
async-std = { version = "1.6", features = [ "attributes" ] }
```
@ -181,9 +181,13 @@ use sqlx::postgres::PgPoolOptions;
// use sqlx::mysql::MySqlPoolOptions;
// etc.
#[async_std::main] // or #[tokio::main]
#[async_std::main]
// or #[tokio::main]
async fn main() -> Result<(), sqlx::Error> {
// Create a connection pool
// for MySQL, use MySqlPoolOptions::new()
// for SQLite, use SqlitePoolOptions::new()
// etc.
let pool = PgPoolOptions::new()
.max_connections(5)
.connect("postgres://postgres:password@localhost/test").await?;