Check if a view exists. # Arguments `name` - The name of the view to check
(&self, name: &str)
| 371 | /// |
| 372 | /// * `name` - The name of the view to check |
| 373 | pub fn view_exists(&self, name: &str) -> Result<bool, RepositoryError> { |
| 374 | let txn = self |
| 375 | .pristine |
| 376 | .read_txn() |
| 377 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 378 | |
| 379 | Ok(txn |
| 380 | .get_view(name) |
| 381 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 382 | .is_some()) |
| 383 | } |
| 384 | |
| 385 | /// Delete a view from the repository. |
| 386 | /// |
no test coverage detected