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

Method view_exists

atomic-repository/src/repository/views.rs:411–421  ·  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

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

Callers 9

runMethod · 0.80
runMethod · 0.80
remove_park_viewMethod · 0.80
run_asyncMethod · 0.80
runMethod · 0.80
runMethod · 0.80
run_asyncMethod · 0.80
apply_view_manifestMethod · 0.80

Calls 2

read_txnMethod · 0.80
get_viewMethod · 0.45

Tested by

no test coverage detected