doc: add initial documentation for load_by_filter function in catalog

This commit is contained in:
2025-10-18 20:03:50 +02:00
parent 501ee9013a
commit 489492ab15

View File

@@ -214,6 +214,8 @@ impl Catalog {
Ok(()) Ok(())
} }
/// Loads all entities matching the filter values
/// Different entity class with clashing attribute names might be loaded
pub fn load_by_filter(&mut self, filter: &Filter) -> Result<(), FailedTo> { pub fn load_by_filter(&mut self, filter: &Filter) -> Result<(), FailedTo> {
let path = path::Path::new(&self.path); let path = path::Path::new(&self.path);
let entities = sqlite::load::by_filter(path, filter).map_err(|_| FailedTo::LoadFromDB)?; let entities = sqlite::load::by_filter(path, filter).map_err(|_| FailedTo::LoadFromDB)?;