mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibWeb/IDB: Implement store_a_record_into_an_object_store
This commit is contained in:
Notes:
github-actions[bot]
2025-04-23 18:37:08 +00:00
Author: https://github.com/stelar7 Commit: https://github.com/LadybirdBrowser/ladybird/commit/fb17dae42ba Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4317 Reviewed-by: https://github.com/ADKaster ✅ Reviewed-by: https://github.com/kennethmyhra ✅
@@ -48,4 +48,13 @@ void Index::set_name(String name)
|
||||
m_name = move(name);
|
||||
}
|
||||
|
||||
bool Index::has_record_with_key(GC::Ref<Key> key)
|
||||
{
|
||||
auto index = m_records.find_if([&key](auto const& record) {
|
||||
return record.key == key;
|
||||
});
|
||||
|
||||
return index != m_records.end();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user