From 4370d448a89fc5ae74b592abd317ba4589677822 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Fri, 3 Feb 2023 15:15:15 +0800 Subject: [PATCH] Added `DatabaseConnection::close` (SeaQL/sea-orm#1236) --- SeaORM/docs/02-install-and-config/02-connection.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/SeaORM/docs/02-install-and-config/02-connection.md b/SeaORM/docs/02-install-and-config/02-connection.md index 4a212cd9770..0b496b492bb 100644 --- a/SeaORM/docs/02-install-and-config/02-connection.md +++ b/SeaORM/docs/02-install-and-config/02-connection.md @@ -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?; +```