MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / view_exists

Method view_exists

atomic-repository/src/repository/views.rs:356–366  ·  view source on GitHub ↗

Check if a view exists. # Arguments `name` - The name of the view to check

(&self, name: &str)

Source from the content-addressed store, hash-verified

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 ///

Callers 5

runMethod · 0.80
runMethod · 0.80
run_asyncMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 2

read_txnMethod · 0.80
get_viewMethod · 0.45

Tested by

no test coverage detected