Check if a view exists. # Arguments `name` - The name of the view to check
(&self, name: &str)
| 409 | /// |
| 410 | /// * `name` - The name of the view to check |
| 411 | pub fn view_exists(&self, name: &str) -> Result<bool, RepositoryError> { |
| 412 | let txn = self |
| 413 | .pristine |
| 414 | .read_txn() |
| 415 | .map_err(|e| RepositoryError::Database(e.to_string()))?; |
| 416 | |
| 417 | Ok(txn |
| 418 | .get_view(name) |
| 419 | .map_err(|e| RepositoryError::Database(e.to_string()))? |
| 420 | .is_some()) |
| 421 | } |
| 422 | |
| 423 | /// Delete a view from the repository. |
| 424 | /// |
no test coverage detected