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

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

From: timeless <timeless@gmail.com>
Date: Tue, 7 Jun 2011 19:16:48 -0400
Message-ID: <BANLkTinVt_BsUq76=rdU=k+fr8z8EL=4vQ@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Israel Hilerio <israelh@microsoft.com>, Cameron McCormack <cam@mcc.id.au>, "public-webapps@w3.org" <public-webapps@w3.org>
On Tue, Jun 7, 2011 at 5:03 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> For example, say that we in version 2 of indexedDB add support for
> foreign keys. So that you can say:
> createObjectStore("car", { keyPath: "id", foreignKeys: [{keyPath:
> "brand", objectStore: "car-brands"}]);

> It seems bad that if a user thinking they are using a indexedDB
> implementation which supports version 2 calls this function and expect
> the foreignKey constraint enforced, but in reality they're calling it
> on a v1 implementation which silently ignores it.

would having a field: "mandatory" which indicates which arguments (or
feature names) must be supported by the implementation assuage your

createObjectStore("car", { mandatory: ["foreignKeys"], keyPath: "id",
foreignKeys: [{keyPath: "brand", objectStore: "car-brands"}]);
Received on Tuesday, 7 June 2011 23:17:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:20 UTC