(&self)
| 46 | |
| 47 | impl DatabaseConfig { |
| 48 | pub fn get_sqlite_url(&self) -> Option<String> { |
| 49 | self.sqlite.as_ref().and_then(|c| { |
| 50 | c.url |
| 51 | .clone() |
| 52 | .map(Into::into) |
| 53 | .or_else(|| c.database.as_ref().map(|db| format!("sqlite://{}", db))) |
| 54 | }) |
| 55 | } |
| 56 | |
| 57 | pub fn get_postgres_url(&self) -> Option<String> { |
| 58 | self.postgresql.as_ref().and_then(|c| { |
no test coverage detected