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

Method view_exists

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

358 ///
359 /// * `name` - The name of the view to check
360 pub fn view_exists(&self, name: &str) -> Result<bool, RepositoryError> {
361 let txn = self
362 .pristine
363 .read_txn()
364 .map_err(|e| RepositoryError::Database(e.to_string()))?;
365
366 Ok(txn
367 .get_view(name)
368 .map_err(|e| RepositoryError::Database(e.to_string()))?
369 .is_some())
370 }
371
372 /// Delete a view from the repository.
373 ///

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