- From: ikram1201 <notifications@github.com>
- Date: Sat, 07 Nov 2026 14:58:41 -0800
- To: w3c/IndexedDB <IndexedDB@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/IndexedDB/pull/515@github.com>
# Handle null and undefined queries in multi-item requests
Closes #493
## Summary
Add an explicit null/undefined branch to “create a request to retrieve multiple items”: use an unbounded key range and `next` direction without overwriting the optional count argument.
This fixes `getAll(null, count)` / `getAll(undefined, count)` and the corresponding `getAllKeys()` algorithm paths on both object stores and indexes. The potentially-valid-key-range and options-dictionary branches are otherwise unchanged.
`getAllRecords()` already takes an `IDBGetAllOptions` dictionary with a default of `{}`, so null/undefined inputs are converted to a dictionary before calling this algorithm. No separate method-level change is needed.
Thanks to @RupinMittal for identifying the problem and proposing the branch. This follows the correction discussed in #493, with support from @annevk and @ArnaudBienner.
The following tasks have been completed:
* [x] Confirmed there are no ReSpec/BikeShed errors or warnings. Bikeshed 7.2.1, before and after.
* [ ] Modified Web platform tests: companion WPT PR to follow
The companion patch adds 38 focused cases per global, checking omitted/null/undefined inputs, preservation of count, zero-count behavior and ordering, with `getAllRecords()` dictionary controls. Headless Chrome 156.0.8078.47 and Firefox 159.0.1 each pass all 44 generated tests / 1,076 subtests across the new file and ten existing get-all files. WPT lint passes for the new file.
Implementation commitment:
* [ ] WebKit — no commitment requested; not run locally.
* [ ] Chromium — no commitment requested; the tests pass locally in Chrome 156.0.8078.47.
* [ ] Gecko — no commitment requested; the tests pass locally in Firefox 159.0.1.
These are local behavior observations, not browser implementation commitments. No implementation code is changed.
<!--
This comment and the below content is programmatically generated.
You may add a comma-separated list of anchors you'd like a
direct link to below (e.g. #idl-serializers, #idl-sequence):
Don't remove this comment or modify anything below this line.
If you don't want a preview generated for this pull request,
just replace the whole of this comment's content by "no preview"
and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/ikram1201/IndexedDB/pull/515.html" title="Last updated on Nov 7, 2026, 10:58 PM UTC (943bbf9)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/IndexedDB/515/f9f83f1...ikram1201:943bbf9.html" title="Last updated on Nov 7, 2026, 10:58 PM UTC (943bbf9)">Diff</a>
You can view, comment on, or merge this pull request online at:
https://github.com/w3c/IndexedDB/pull/515
-- Commit Summary --
* Handle null and undefined queries in multi-item requests
-- File Changes --
M index.bs (8)
-- Patch Links --
https://github.com/w3c/IndexedDB/pull/515.patch
https://github.com/w3c/IndexedDB/pull/515.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/pull/515
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/IndexedDB/pull/515@github.com>
Received on Saturday, 7 November 2026 22:58:45 UTC