(url: &str)
| 23 | |
| 24 | impl PostgresStore { |
| 25 | pub async fn connect(url: &str) -> PersistenceResult<Self> { |
| 26 | let pool = PgPoolOptions::new() |
| 27 | .max_connections(10) |
| 28 | .connect(url) |
| 29 | .await |
| 30 | .map_err(|e| map_db_error(&e))?; |
| 31 | |
| 32 | Ok(Self { pool }) |
| 33 | } |
| 34 | |
| 35 | pub async fn migrate(&self) -> PersistenceResult<()> { |
| 36 | POSTGRES_MIGRATOR |
nothing calls this directly
no test coverage detected