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

Method view_exists

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

488 ///
489 /// * `name` - The name of the view to check
490 pub fn view_exists(&self, name: &str) -> Result<bool, RepositoryError> {
491 let txn = self
492 .pristine
493 .read_txn()
494 .map_err(|e| RepositoryError::Database(e.to_string()))?;
495
496 Ok(txn
497 .get_view(name)
498 .map_err(|e| RepositoryError::Database(e.to_string()))?
499 .is_some())
500 }
501
502 /// Preview which changes would lose their last view reference on deletion.
503 ///

Callers 15

runMethod · 0.80
require_viewFunction · 0.80
view_log_up_toMethod · 0.80
run_importMethod · 0.80
print_divergence_noticesFunction · 0.80
run_statusFunction · 0.80
run_shim_reviewFunction · 0.80

Calls 2

read_txnMethod · 0.80
get_viewMethod · 0.45