Skip to content

Commit

Permalink
Added DatabaseConnection::close (SeaQL/sea-orm#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Feb 3, 2023
1 parent 5375c34 commit 4370d44
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions SeaORM/docs/02-install-and-config/02-connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@ opt.max_connections(100)

let db = Database::connect(opt).await?;
```

## Closing Connection

To close the connection explicitly, call the `close` method.

```rust
let db = Database::connect(url).await?;

// Closing connection here
db.close().await?;
```

0 comments on commit 4370d44

Please sign in to comment.