diff --git a/index.bs b/index.bs
index 3a7888e..99d9444 100644
--- a/index.bs
+++ b/index.bs
@@ -2755,6 +2755,8 @@ interface IDBObjectStore {
optional [EnforceRange] unsigned long count);
[NewObject] IDBRequest getAllKeys(optional any query,
optional [EnforceRange] unsigned long count);
+ [NewObject] IDBRequest getAllEntries(optional any query,
+ optional [EnforceRange] unsigned long count);
[NewObject] IDBRequest count(optional any query);
[NewObject] IDBRequest openCursor(optional any query,
@@ -3135,6 +3137,17 @@ must run these steps:
If successful, |request|'s {{IDBRequest/result}} will
be an [=Array=] of the [=/keys=].
+ : |request| = |store| .
+ {{IDBObjectStore/getAllEntries()|getAllEntries}}(query [,
+ |count|])
+ ::
+ Retrieves the [=/keys=] and [=/values=] of [=object-store/records=] matching the
+ given [=/key=] or [=key range=] in |query| (up to |count| if given).
+
+ 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|)
::
@@ -3241,14 +3254,14 @@ method, when invoked, must run these steps:
1. Return the result (an {{IDBRequest}}) of running
[=asynchronously execute a request=]
with **this** as |source| and
- [=retrieve multiple values from an object store=]
+ [=retrieve multiple items from an object store=]
as |operation|, using the [=current Realm=] as |targetRealm|,
- |store|, |range|, and |count| if given.
+ |store|, |range|, "value" as |kind|, and |count| if given.
The |query| parameter may be a [=/key=] or [=key range=] (an {{IDBKeyRange}})
-identifying the [=object-store/records=] to be retrieved. If null or not given,
+identifying the [=object-store/record=] values to be retrieved. If null or not given,
an [=unbounded key range=] is used. If |count| is specified and
there are more than |count| records in range, only the first |count|
will be retrieved.
@@ -3276,17 +3289,59 @@ method, when invoked, must run these steps:
1. Return the result (an {{IDBRequest}}) of running
[=asynchronously execute a request=]
with **this** as |source| and
- [=retrieve multiple keys from an object store=] as
- |operation|, using |store|, |range|, and |count| if given.
+ [=retrieve multiple items from an object store=] as
+ |operation|, using the [=current Realm=] as |targetRealm|,
+ |store|, |range|, "key" as |kind|, and |count| if given.
+
+
+
+The |query| parameter may be a [=/key=] or [=key range=] (an {{IDBKeyRange}})
+identifying the [=object-store/record=] keys to be retrieved. If null or not
+given, an [=unbounded key range=] is used. If |count| is specified
+and there are more than |count| keys in range, only the first |count|
+will be retrieved.
+
+
+
+
+The getAllEntries(|query|, |count|)
+method, when invoked, must run these steps:
+
+1. Let |transaction| be **this**'s [=object-store-handle/transaction=].
+
+1. Let |store| be **this**'s [=object-store-handle/object store=].
+
+1. If |store| has been deleted, [=throw=] an
+ "{{InvalidStateError}}" {{DOMException}}.
+
+1. If |transaction|'s [=transaction/state=] is not [=transaction/active=],
+ then [=throw=] a "{{TransactionInactiveError}}" {{DOMException}}.
+
+1. Let |range| be the result of running the steps to
+ [=convert a value to a key range=] with |query|.
+ Rethrow any exceptions.
+
+1. Return the result (an {{IDBRequest}}) of running
+ [=asynchronously execute a request=]
+ with **this** as |source| and
+ [=retrieve multiple items from an object store=] as
+ |operation|, using the [=current Realm=] as |targetRealm|,
+ |store|, |range|, "key+value", and |count| if given.
The |query| parameter may be a [=/key=] or [=key range=] (an {{IDBKeyRange}})
-identifying the [=object-store/records=] keys to be retrieved. If null or not
+identifying the [=object-store/records=] to be retrieved. If null or not
given, an [=unbounded key range=] is used. If |count| is specified
and there are more than |count| keys in range, only the first |count|
will be retrieved.
+
+
@@ -3667,6 +3722,8 @@ interface IDBIndex {
optional [EnforceRange] unsigned long count);
[NewObject] IDBRequest getAllKeys(optional any query,
optional [EnforceRange] unsigned long count);
+ [NewObject] IDBRequest getAllEntries(optional any query,
+ optional [EnforceRange] unsigned long count);
[NewObject] IDBRequest count(optional any query);
[NewObject] IDBRequest openCursor(optional any query,
@@ -3814,6 +3871,18 @@ return **this**'s [=index-handle/index=]'s [=unique flag=].
If successful, |request|'s {{IDBRequest/result}} will be an
[=Array=] of the [=/keys=].
+
+ : |request| = |index| .
+ {{IDBIndex/getAllEntries()|getAllEntries}}(query [,
+ |count|])
+ ::
+ Retrieves the [=/keys=] and [=/values=] of [=object-store/records=] matching the given
+ [=/key=] or [=key range=] in |query| (up to |count| if given).
+
+ If successful, |request|'s {{IDBRequest/result}} will be an
+ [=Array=], with each member being an [=Array=] with a [=/key=]
+ [=/value=] pair.
+
: |request| = |index| .
{{IDBIndex/count()|count}}(|query|)
::
@@ -3924,14 +3993,14 @@ when invoked, must run these steps:
1. Return the result (an {{IDBRequest}}) of running
[=asynchronously execute a request=]
with **this** as |source| and
- [=retrieve multiple referenced values from an index=] as
+ [=retrieve multiple items from an index=] as
|operation|, using the [=current Realm=] as |targetRealm|,
- |index|, |range|, and |count| if given.
+ |index|, |range|, "value" as |kind|, and |count| if given.
The |query| parameter may be a [=/key=] or [=key range=] (an {{IDBKeyRange}})
-identifying the [=object-store/records=] to be retrieved. If null or not given,
+identifying the [=object-store/record=] values to be retrieved. If null or not given,
an [=unbounded key range=] is used. If |count| is specified and
there are more than |count| records in range, only the first |count|
will be retrieved.
@@ -3959,18 +4028,60 @@ method, when invoked, must run these steps:
1. Return the result (an {{IDBRequest}}) of running
[=asynchronously execute a request=]
with **this** as |source| and
- [=retrieve multiple values from an index=] as |operation|, using
- |index|, |range|, and |count| if given.
+ [=retrieve multiple items from an index=] as |operation|, using
+ the [=current Realm=] as |targetRealm|,
+ |index|, |range|, "key" as |kind|, and |count| if given.
The |query| parameter may be a [=/key=] or [=key range=] (an {{IDBKeyRange}})
-identifying the [=object-store/records=] keys to be retrieved. If null or not
+identifying the [=object-store/record=] keys to be retrieved. If null or not
given, an [=unbounded key range=] is used. If |count| is specified
and there are more than |count| keys in range, only the first |count|
will be retrieved.
+
+
+The getAllEntries(|query|, |count|)
+method, when invoked, must run these steps:
+
+1. Let |transaction| be **this**'s [=index-handle/transaction=].
+
+1. Let |index| be **this**'s [=index-handle/index=].
+
+1. If |index| or |index|'s [=/object store=] has
+ been deleted, [=throw=] an "{{InvalidStateError}}" {{DOMException}}.
+
+1. If |transaction|'s [=transaction/state=] is not [=transaction/active=],
+ then [=throw=] a "{{TransactionInactiveError}}" {{DOMException}}.
+
+1. Let |range| be the result of running the steps to
+ [=convert a value to a key range=] with |query|.
+ Rethrow any exceptions.
+
+1. Return the result (an {{IDBRequest}}) of running
+ [=asynchronously execute a request=]
+ with **this** as |source| and
+ [=retrieve multiple items from an index=] as |operation|, using
+ the [=current Realm=] as |targetRealm|,
+ |index|, |range|, "key+value" as |kind|, and |count| if given.
+
+
+
+The |query| parameter may be a [=/key=] or [=key range=] (an {{IDBKeyRange}})
+identifying the [=object-store/records=] to be retrieved. If null or not
+given, an [=unbounded key range=] is used. If |count| is specified
+and there are more than |count| keys in range, only the first |count|
+will be retrieved.
+
+
+
+
The count(|query|) method, when
@@ -5778,30 +5889,6 @@ To retrieve a value from an object store with
-
-
-To retrieve multiple values from an object
-store with |targetRealm|, |store|, |range| and optional |count|, run these steps:
-
-1. If |count| is not given or is 0 (zero), let |count| be infinity.
-
-1. Let |records| be a [=/list=] containing the first |count| [=object-store/records=]
- in |store|'s [=object-store/list of records=] whose [=/key=] is
- [=in=] |range|.
-
-1. Let |list| be an empty list.
-
-1. [=list/For each=] |record| of |records|:
-
- 1. Let |serialized| be |record|'s [=/value=].
- 1. Let |entry| be [=!=] StructuredDeserialize(|serialized|, |targetRealm|).
- 1. Append |entry| to |list|.
-
-1. Return |list| converted to a [=sequence<any>=].
-
-
-
-
To retrieve a key from an object store
@@ -5821,8 +5908,8 @@ with |store| and |range|, run these steps:
-To retrieve multiple keys from an object store
-with |store|, |range| and optional |count|, run these steps:
+To retrieve multiple items from an object store
+with |targetRealm|, |store|, |range|, |kind| and optional |count|, run these steps:
1. If |count| is not given or is 0 (zero), let |count| be infinity.
@@ -5832,11 +5919,29 @@ with |store|, |range| and optional |count|, run these steps:
1. Let |list| be an empty [=/list=].
-1. [=list/For each=] |record| of |records|:
+1. [=list/For each=] |record| of |records|, switching on |kind|:
- 1. Let |entry| be the result of running [=convert a
- key to a value=] with |record|'s key.
- 1. Append |entry| to |list|.
+
+ : "key"
+ ::
+ 1. Let |key| be the result of running [=convert a key to a value=] with |record|'s key.
+ 1. [=list/Append=] |key| to |list|.
+
+ : "value"
+ ::
+ 1. Let |serialized| be |record|'s [=/value=].
+ 1. Let |value| be [=!=] StructuredDeserialize(|serialized|, |targetRealm|).
+ 1. [=list/Append=] |value| to |list|.
+
+ : "key+value"
+ ::
+ 1. Let |key| be the result of running [=convert a key to a value=] with |record|'s key.
+ 1. Let |serialized| be |record|'s [=/value=].
+ 1. Let |value| be [=!=] StructuredDeserialize(|serialized|, |targetRealm|).
+ 1. Let |pair| be a [=/list=] containing |key| and |value|.
+ 1. [=list/Append=] |pair| convered to a [=sequence<any>=] to |list|.
+
+
1. Return |list| converted to a [=sequence<any>=].
@@ -5864,30 +5969,8 @@ with |targetRealm|, |index| and |range|, run these steps:
-
-
-To retrieve multiple referenced values from an
-index with |targetRealm|, |index|, |range| and optional |count|, run these steps:
-
-1. If |count| is not given or is 0 (zero), let |count| be infinity.
-
-1. Let |records| be a list containing the first |count| [=object-store/records=]
- in |index|'s [=index/list of records=] whose [=index/key=] is [=in=] |range|.
-
-1. Let |list| be an empty [=/list=].
-
-1. [=list/For each=] |record| of |records|:
-
- 1. Let |serialized| be |record|'s [=referenced value=].
- 1. Let |entry| be [=!=] StructuredDeserialize(|serialized|, |targetRealm|).
- 1. Append |entry| to |list|.
-
-1. Return |list| converted to a [=sequence<any>=].
-
-
-
@@ -5909,21 +5992,39 @@ To retrieve a value from an index with
-To retrieve multiple values from an index with
-|index|, |range| and optional |count|, run these steps:
+To retrieve multiple items from an index with
+|targetRealm|, |index|, |range|, |kind| and optional |count|, run these steps:
1. If |count| is not given or is 0 (zero), let |count| be infinity.
-1. Let |records| be a list containing the first |count| [=index/records=] in
- |index|'s [=index/list of records=] whose [=index/key=] is [=in=] |range|.
+1. Let |records| be a list containing the first |count| [=object-store/records=]
+ in |index|'s [=index/list of records=] whose [=index/key=] is [=in=] |range|.
1. Let |list| be an empty [=/list=].
-1. [=list/For each=] |record| of |records|:
+1. [=list/For each=] |record| of |records|, switching on |kind|:
- 1. Let |entry| be the result of running [=convert a
- key to a value=] with |record|'s value.
- 1. Append |entry| to |list|.
+
+ : "key"
+ ::
+ 1. Let |key| be the result of running [=convert a key to a value=] with |record|'s value.
+ 1. [=list/Append=] |key| to |list|.
+
+ : "value"
+ ::
+ 1. Let |serialized| be |record|'s [=referenced value=].
+ 1. Let |value| be [=!=] StructuredDeserialize(|serialized|, |targetRealm|).
+ 1. [=list/Append=] |value| to |list|.
+
+ : "key+value"
+ ::
+ 1. Let |key| be the result of running [=convert a key to a value=] with |record|'s value.
+ 1. Let |serialized| be |record|'s [=referenced value=].
+ 1. Let |value| be [=!=] StructuredDeserialize(|serialized|, |targetRealm|).
+ 1. Let |pair| be a [=/list=] containing |key| and |value|.
+ 1. [=list/Append=] |pair| convered to a [=sequence<any>=] to |list|.
+
+
1. Return |list| converted to a [=sequence<any>=].
@@ -6815,6 +6916,7 @@ For the revision history of the second edition, see [that document's Revision Hi
* Added {{IDBCursor/request}} attribute. ([Issue #255](https://github.com/w3c/IndexedDB/issues/255))
* Removed handling for nonstandard `lastModifiedDate` property of {{File}} objects. ([Issue #215](https://github.com/w3c/IndexedDB/issues/215))
* Remove escaping {{IDBKeyRange/includes()}} method. ([Issue #294](https://github.com/w3c/IndexedDB/issues/294))
+* Added object store {{IDBObjectStore/getAllEntries()}} and index {{IDBObjectStore/getAllEntries()}} methods. ([Issue #206](https://github.com/w3c/IndexedDB/issues/206))
# Acknowledgements # {#acknowledgements}