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

Method view_exists

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

371 ///
372 /// * `name` - The name of the view to check
373 pub fn view_exists(&self, name: &str) -> Result<bool, RepositoryError> {
374 let txn = self
375 .pristine
376 .read_txn()
377 .map_err(|e| RepositoryError::Database(e.to_string()))?;
378
379 Ok(txn
380 .get_view(name)
381 .map_err(|e| RepositoryError::Database(e.to_string()))?
382 .is_some())
383 }
384
385 /// Delete a view from the repository.
386 ///

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