indexeddb: Implement getAll and getAllKeys (#38885)

Implement getAll and getAllKeys for IDBObjectStore.

Testing: WPT & Unit testing
Fixes: Part of #6963.

---------

Signed-off-by: Ashwin Naren <arihant2math@gmail.com>
This commit is contained in:
Ashwin Naren 2025-09-05 22:48:11 -07:00 committed by GitHub
parent e64c53972a
commit b5d6555238
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 308 additions and 86 deletions

View file

@ -248,7 +248,7 @@ fn test_as_singleton() {
assert!(full_range.as_singleton().is_none());
}
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Serialize)]
pub enum PutItemResult {
Success,
CannotOverwrite,
@ -266,6 +266,17 @@ pub enum AsyncReadOnlyOperation {
key_range: IndexedDBKeyRange,
},
GetAllKeys {
sender: IpcSender<BackendResult<Vec<IndexedDBKeyType>>>,
key_range: IndexedDBKeyRange,
count: Option<u32>,
},
GetAllItems {
sender: IpcSender<BackendResult<Vec<Vec<u8>>>>,
key_range: IndexedDBKeyRange,
count: Option<u32>,
},
Count {
sender: IpcSender<BackendResult<u64>>,
key_range: IndexedDBKeyRange,