#1117: Add IndexedDB getAllRecords() method and update getAll()/getAllKeys() to support direction option

Visit on Github.

Opened Jun 26, 2025

こんにちは TAG-さん!

I'm requesting a TAG review of the getAllRecords() method and the direction option for IndexedDB.

Proposes a new operation, getAllRecords(), which combines getAllKeys() with getAll() to enumerate both primary keys and values at the same time. For an IDBIndex, getAllRecords() also provides the record's index key in addition to the primary key and value. Lastly, getAllRecords() offers a new direction option to enumerate records sorted by key in descending order. To add the direction option to the existing getAll() and getAllKeys() operations, this explainer proposes new function overloads that accept the same argument as getAllRecords(): the IDBGetAllOptions dictionary.

Further details:

<!-- Content below this is maintained by @w3c-tag-bot -->

Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1117

Discussions

Log in to see TAG-private discussions.

Discussed Jul 7, 2025 (See Github)

Christian: Only halfway through, getAllRecords() seems fine, but the changing the existing methods needs a deeper look.

Lola: Do people want to join this issue?

Martin: I would love to join. Also think that the changes to existing methods need a deeper look.

Discussed Jul 14, 2025 (See Github)

(Martin & Christian not here)

Discussed Jul 21, 2025 (See Github)

Christian: Didn't have time yet, will take care of it until next week.

End of official agenda, bringing over issues from Breakout A.

Discussed Jul 28, 2025 (See Github)

(martin) Christian did the work here and I agree that we should just post the review. The backwards-compatibility story is a bit sketchy, but this is overall good.

Comment by @christianliebel Jul 31, 2025 (See Github)

@SteveBeckerMSFT Thank you for your proposal. The potential performance improvements with the new getAllRecords() method look very promising. Adding direction options to the existing getAll() and getAllKeys() functions is great for consistency.

Since detecting the availability of the new overloads by checking for the existence of the getAllRecords() function is rather unusual, we ask that you ensure the developer documentation clearly highlights this aspect. Apart from that, we agree that the compatibility risk is low since passing in dictionaries to getAll() and getAllKeys() was previously a programming error and could never have worked.

Overall, we're closing this review as satisfied.