LibWeb/IDB: Implement store_a_record_into_an_object_store

This commit is contained in:
stelar7
2025-04-11 11:38:29 +02:00
committed by Andrew Kaster
parent afe7951af4
commit fb17dae42b
Notes: github-actions[bot] 2025-04-23 18:37:08 +00:00
6 changed files with 147 additions and 0 deletions

View File

@@ -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();
}
}