mirror of
https://github.com/servo/servo.git
synced 2025-09-27 15:20:09 +01:00
indexeddb: Implement openCursor
and openKeyCursor
for object store (#39080)
Continue on implementing indexeddb's cursor. This patch focuses on implementing the `openCursor` [1] and `openKeyCursor` [2] methods of the `IDBObjectStore` interface, which create and initialize cursors by running the iterate-a-cursor algorithm [3]. It also adds struct `IndexedDBRecord` to `components/shared/net/indexeddb_thread.rs`. This struct can later be used to implement the new `IDBRecord` interface [4]. [1] https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-opencursor [2] https://www.w3.org/TR/IndexedDB-2/#dom-idbobjectstore-openkeycursor [3] https://www.w3.org/TR/IndexedDB-2/#iterate-a-cursor [4] https://w3c.github.io/IndexedDB/#record-interface Testing: Pass WPT tests that were expected to fail. Fixes: Part of #38111 --------- Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This commit is contained in:
parent
1f63116bdd
commit
250c4cda00
26 changed files with 580 additions and 279 deletions
|
@ -28,10 +28,10 @@ interface IDBObjectStore {
|
|||
optional [EnforceRange] unsigned long count);
|
||||
[NewObject, Throws] IDBRequest count(optional any query);
|
||||
|
||||
// [NewObject] IDBRequest openCursor(optional any query,
|
||||
// optional IDBCursorDirection direction = "next");
|
||||
// [NewObject] IDBRequest openKeyCursor(optional any query,
|
||||
// optional IDBCursorDirection direction = "next");
|
||||
[NewObject, Throws] IDBRequest openCursor(optional any query,
|
||||
optional IDBCursorDirection direction = "next");
|
||||
[NewObject, Throws] IDBRequest openKeyCursor(optional any query,
|
||||
optional IDBCursorDirection direction = "next");
|
||||
|
||||
// IDBIndex index(DOMString name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue