Initialize the session connection with the database handler This ensures the session has its dedicated connection
(&self)
| 124 | /// Initialize the session connection with the database handler |
| 125 | /// This ensures the session has its dedicated connection |
| 126 | pub async fn initialize_connection(&self) -> Result<(), crate::PgSqliteError> { |
| 127 | if let Some(ref db_handler) = *self.db_handler.lock().await { |
| 128 | db_handler.create_session_connection(self.id).await?; |
| 129 | } |
| 130 | Ok(()) |
| 131 | } |
| 132 | |
| 133 | /// Clean up the session connection |
| 134 | /// This should be called when the session is being terminated |
no test coverage detected