Bug 16501 - IndexedDB: IDBObjectStore/IDBIndex.keyPath when key path is an Array?
IndexedDB: IDBObjectStore/IDBIndex.keyPath when key path is an Array?
Status: RESOLVED FIXED
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API
unspecified
All All
: P2 normal
: ---
Assigned To: This bug has no owner yet - up for the taking
public-webapps-bugzilla
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-23 21:18 UTC by Joshua Bell
Modified: 2012-03-26 10:38 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Bell 2012-03-23 21:18:52 UTC
Both object stores and indexes can have key paths which are Arrays, but the WebIDL defines the keyPath attribute for each as a DOMString. What should these yield if the key path is an Array?
Comment 1 Joshua Bell 2012-03-23 22:04:13 UTC
The WebIDL for IDBObjectStore's createIndex method needs an update as well:

 IDBIndex   createIndex (DOMString name, DOMString keyPath, optional IDBIndexParameters optionalParameters);

Should either be "any" or an overload:

 IDBIndex   createIndex (DOMString name, DOMString keyPath, optional IDBIndexParameters optionalParameters);
 IDBIndex   createIndex (DOMString name, DOMString[] keyPath, optional IDBIndexParameters optionalParameters);
Comment 2 Jonas Sicking 2012-03-23 22:29:18 UTC
Should be fixed now.

I couldn't get ReSpec to work with the overloads, so I just used 'any'. The normative requirements for how to convert the keyPath into a string or array of strings was already in the normative text.