From f1c20aecdb3272d93140261cb220b324483c64ec Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Thu, 2 Mar 2023 15:22:03 -0800 Subject: [PATCH] git squash commit for getallentries. 75a74e3f91abff6c75af6fc39f191bc1027a8cfb Speculative getAllEntries() spec 1f9fceec7bc231b50c9381cc69a2450e43e0d637 rebase cleanup --- index.bs | 221 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 147 insertions(+), 74 deletions(-) diff --git a/index.bs b/index.bs index b26a6bb..b94ac66 100644 --- a/index.bs +++ b/index.bs @@ -2745,6 +2745,7 @@ interface IDBObjectStore { optional [EnforceRange] unsigned long count); [NewObject] IDBRequest getAllKeys(optional any query, optional [EnforceRange] unsigned long count); + [NewObject] IDBRequest getAllEntries(optional IDBGetAllEntriesOptions options = {}); [NewObject] IDBRequest count(optional any query); [NewObject] IDBRequest openCursor(optional any query, @@ -2764,6 +2765,12 @@ dictionary IDBIndexParameters { boolean unique = false; boolean multiEntry = false; }; + +dictionary IDBGetAllEntriesOptions { + any query = null; + [EnforceRange] unsigned long count; + IDBCursorDirection direction = "next"; +};
@@ -3116,6 +3123,14 @@ The clear() method steps are: If successful, |request|'s {{IDBRequest/result}} will be an [=ECMAScript/Array=] of the [=/keys=]. + : |request| = |store| . {{IDBObjectStore/getAllEntries()|getAllEntries}}(|options|) + :: + Retrieves multiple [=/keys=] and [=/values=] of [=object-store/records=]. + + The |query| option specifies a [=/key=] or [=key range=] to match. The |count| option limits the number or records matched. Set the |direction| option to "{{IDBCursorDirection/next}}" to retrieve the first |count| records, or "{{IDBCursorDirection/prev}}" to return the last |count| records. + + If successful, |request|'s {{IDBRequest/result}} will be an [=ECMAScript/Array=], with each member being an [=ECMAScript/Array=] with a [=/key=] [=/value=] pair. + : |request| = |store| . {{IDBObjectStore/count()|count}}(|query|) :: @@ -3212,7 +3227,7 @@ The getAll(|query|, |count|) method steps a [=/converting a value to a key range=] with |query|. Rethrow any exceptions. -1. Let |operation| be an algorithm to run [=retrieve multiple values from an object store=] with the [=ECMAScript/current Realm=], |store|, |range|, and |count| if given. +1. Let |operation| be an algorithm to run [=retrieve multiple items from an object store=] with the [=ECMAScript/current Realm=], |store|, |range|, "value", and |count| if given. 1. Return the result (an {{IDBRequest}}) of running [=asynchronously execute a request=] with [=/this=] and |operation|. @@ -3221,7 +3236,7 @@ The getAll(|query|, |count|) method steps a