mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
implement custom search providers feature
This commit is contained in:
parent
58d4439fcf
commit
b8a8fb49de
16 changed files with 668 additions and 30 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue