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

Method view_exists

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

464 ///
465 /// * `name` - The name of the view to check
466 pub fn view_exists(&self, name: &str) -> Result<bool, RepositoryError> {
467 let txn = self
468 .pristine
469 .read_txn()
470 .map_err(|e| RepositoryError::Database(e.to_string()))?;
471
472 Ok(txn
473 .get_view(name)
474 .map_err(|e| RepositoryError::Database(e.to_string()))?
475 .is_some())
476 }
477
478 /// Delete a view from the repository.
479 ///

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