Verify the database is reachable by acquiring a pooled connection and issuing a protocol-level ping.
(&self)
| 42 | /// Verify the database is reachable by acquiring a pooled connection |
| 43 | /// and issuing a protocol-level ping. |
| 44 | pub async fn ping(&self) -> PersistenceResult<()> { |
| 45 | let mut conn = self.pool.acquire().await.map_err(|e| map_db_error(&e))?; |
| 46 | conn.ping().await.map_err(|e| map_db_error(&e)) |
| 47 | } |
| 48 | |
| 49 | /// Test support only: close the underlying connection pool. |
| 50 | /// |
nothing calls this directly
no test coverage detected