This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16501 - IndexedDB: IDBObjectStore/IDBIndex.keyPath when key path is an Array?
Summary: IndexedDB: IDBObjectStore/IDBIndex.keyPath when key path is an Array?
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-23 21:18 UTC by Joshua Bell
Modified: 2015-04-09 21:51 UTC (History)
4 users (show)

See Also:


Attachments

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 (Not reading bugmail) 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.