Check if a view exists. # Arguments `name` - The name of the view to check
(&self, name: &str)
| 354 | /// |
| 355 | /// * `name` - The name of the view to check |
| 356 | pub fn view_exists(&self, name: &str) -> Result<bool, RepositoryError> { |
| 357 | let txn = self |
| 358 | .pristine |
| 359 | .read_txn() |
| 360 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 361 | |
| 362 | Ok(txn |
| 363 | .get_view(name) |
| 364 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 365 | .is_some()) |
| 366 | } |
| 367 | |
| 368 | /// Delete a view from the repository. |
| 369 | /// |