Re: [w3c/IndexedDB] Add descending order for getAll() and getAllKeys() (#130)

phaux left a comment (w3c/IndexedDB#130)

> As mentioned in the explainer, supporting the IDBGetAllOptions dictionary with getAll()/getAllKeys() introduces compat risk. In particular, some inputs will no longer throw exceptions. For example:
> 
> // `getAll()` No longer throws a "DataError" since the input object is parsed as an `IDBGetAllOptions` dictionary.
> object_store.getAll( { test: 'object' } ); 
> We could potentially reduce compat risk by making one of the IDBGetAllOptions dictionary entries required (like direction maybe). However, requiring direction seems unnatural and maybe not needed since these exception indicate programmer error.
> 
> Additionally, some getAll()/getAllKey() [input objects might be valid IndexedDB keys](https://w3c.github.io/IndexedDB/#key-construct), which includes Dates, Arrays, and ArrayBuffers. We'll need to avoid parsing these types as IDBGetAllOptions dictionaries to maintain existing behavior.
> 
> While this proposal has some quirks, I believe it will meet developer expectations while addressing this issue.
> 
> As always, feedback is very welcome!

Why not simply turn the second argument (count) into the option bag?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/130#issuecomment-3265606960
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/IndexedDB/issues/130/3265606960@github.com>

Received on Monday, 8 September 2025 10:18:32 UTC