W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

[indexeddb] Using WebIDL Dictionary in IDBObjectStore.createIndex for optionalParameters

From: Israel Hilerio <israelh@microsoft.com>
Date: Mon, 6 Jun 2011 19:03:13 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D143F18@TK5EX14MBXC115.redmond.corp.microsoft.com>
Have you considered using the WebIDL dictionary definition as a mechanism to define the optional parameters in the IDBDatabase.createObjectStore method?

Advantages at using the dictionary definition on WebIDL for optional parameters:
. Provides a fixed, ordered set of key-value pairs
. Removes the need to walk the hierarchy chain to determine if these attributes are available
. Provides default values for each of its key-value pairs
. Enables an extensible pattern to add new capabilities in the future

I believe this will change our current method definition to the following:

dictionary IDBOptionalParameters {
   DOMString? keyPath = null;
   boolean? autoIncrement = false;
};

IDBIndex   createIndex (in DOMString name, in DOMString keyPath, in optional IDBOptionalParameters optionalParameters) raises (IDBDatabaseException);

Israel
Received on Monday, 6 June 2011 19:03:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:45 GMT