Re: [w3c/IndexedDB] `getAll()` with both key and value (or index key and primary key) (#206)

Fair points by @abhishek-shanthkumar

**On naming**: IDBIndex's `getAllKeys()` already uses "key" to refer to the object store record's key (i.e. primary key), not the index's key. Likewise `getAll()` returns _referenced_ values i.e. the value half of an object store record. So the established `getAllXXX` terminology is _relative to the referenced object store_. (Well technically `getAll()` should probably be called `getAllValues()` and then we could just call the new thing `getAll()`, but anyway...)

**On form**:

>  If we're agreed on returning `[primaryKey, value, indexKey]`

I think we are aligned on that function but perhaps not the form. It seems to me a bit unclean thing to return an array of a particular length where you just have to know which element is which thing, as opposed to an object such as

```
{`primaryKey`: primaryKey, `referencedValue`: value, `indexKey`: indexKey}
```

 or
```
{`indexKey`: indexKey, 'record': {key: value}}
```

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

Message ID: <w3c/IndexedDB/issues/206/2403343581@github.com>

Received on Wednesday, 9 October 2024 20:11:50 UTC