implement custom search providers feature

This commit is contained in:
yggverse 2025-01-30 15:53:26 +02:00
parent 58d4439fcf
commit b8a8fb49de
16 changed files with 668 additions and 30 deletions

View file

@ -32,8 +32,20 @@ impl Memory {
self.index.borrow_mut().clear()
}
/// Get record by `ID`
// Getters
/// Get all records
pub fn records(&self) -> Vec<Row> {
self.index.borrow().clone()
}
/// Get all records
pub fn default(&self) -> Option<Row> {
for record in self.index.borrow().iter() {
if record.is_default {
return Some(record.clone());
}
}
None
}
}