From 9edc12e33437bccb3bcfcdefea556e66b6adafa7 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Thu, 21 May 2020 12:42:14 -0700 Subject: [PATCH] git squash commit for getallentries. c9342d41e2e4e9fb55232ef48d544d6017de2cf5 Refactor to support getAllEntries linkfy appending IDL this and other rebasing a4d924d4baaea4d76f4ddde9e8092f584105dbdc add index key 544e456894468565d206102901455817d8ed2405 typo ff1283c83570166fc7ca7283b0e6f5f33ed81917 rethink API shape 7121daf17bf1f79f1557347768166d1fd00a909e post-rebase cleanup --- index.bs | 221 ++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 145 insertions(+), 76 deletions(-) diff --git a/index.bs b/index.bs index e1a240b..b9a74d4 100644 --- a/index.bs +++ b/index.bs @@ -2729,6 +2729,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, @@ -2748,6 +2749,12 @@ dictionary IDBIndexParameters { boolean unique = false; boolean multiEntry = false; }; + +dictionary IDBGetAllEntriesOptions { + any query = null; + [EnforceRange] unsigned long count; + IDBCursorDirection direction = "next"; +};
@@ -3095,6 +3102,14 @@ The clear() method steps are: If successful, |request|'s {{IDBRequest/result}} will be an [=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 {{"next"}} to retrieve the first |count| records, or {{"prev"}} to return the last |count| records. + + If successful, |request|'s {{IDBRequest/result}} will be an [=Array=], with each member being an [=Array=] with a [=/key=] [=/value=] pair. + : |request| = |store| . {{IDBObjectStore/count()|count}}(|query|) :: @@ -3191,7 +3206,7 @@ The getAll(|query|, |count|) method steps a [=convert 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 [=/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 [=/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|. @@ -3200,7 +3215,7 @@ The getAll(|query|, |count|) method steps a