mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb/IDB: Implement IDBIndex::get
This commit is contained in:
parent
73fa567e7a
commit
e74e571b56
Notes:
github-actions[bot]
2025-05-14 15:19:35 +00:00
Author: https://github.com/stelar7
Commit: e74e571b56
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4727
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/shannonbooth
7 changed files with 62 additions and 3 deletions
|
@ -76,4 +76,11 @@ void Index::clear_records()
|
|||
m_records.clear();
|
||||
}
|
||||
|
||||
Optional<IndexRecord&> Index::first_in_range(GC::Ref<IDBKeyRange> range)
|
||||
{
|
||||
return m_records.first_matching([&](auto const& record) {
|
||||
return range->is_in_range(record.key);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue