(db_url: &str)
| 18 | |
| 19 | impl Store { |
| 20 | pub async fn new(db_url: &str) -> Result<Self, sqlx::Error> { |
| 21 | tracing::warn!("{}", db_url); |
| 22 | let db_pool = PgPoolOptions::new() |
| 23 | .max_connections(5) |
| 24 | .connect(db_url) |
| 25 | .await?; |
| 26 | |
| 27 | Ok(Store { |
| 28 | connection: db_pool, |
| 29 | }) |
| 30 | } |
| 31 | |
| 32 | pub async fn get_questions( |
| 33 | self, |
nothing calls this directly
no outgoing calls
no test coverage detected