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 12654 - createIndex's options should include whether a field is optional/required
Summary: createIndex's options should include whether a field is optional/required
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: PC 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: 2011-05-13 10:19 UTC by Jeremy Orlow
Modified: 2011-07-11 19:49 UTC (History)
3 users (show)

See Also:


Attachments

Description Jeremy Orlow 2011-05-13 10:19:50 UTC
createIndex's options should include whether a field is optional/required.  I know Jonas and I talked about this a bunch and I thought we had fixed it (or at least filed a bug for it) but I can't find any trace.  Right now Chrome defaults to required and Firefox defaults to optional.  IIRC, after talking about it a bunch, Jonas convinced me it should default to optional to make things less schema-full by default.
Comment 1 Eliot Graff 2011-07-11 19:49:23 UTC
Rewrote 3.1.12, Options Objects, to define the dictionary objects IDBDatabaseOptionalParameters and IDBIndexOptionalParameters (removing the Note, the Issue, and the two sentences about exceptions).
Changed types from the optionalParameters type to the new types in IDBObjectStore.createObjectStore (IDBDatabase and IDBDatabaseSync) and in IDBIndex createIndex (IDBObjectStore and IDBObjectStoreSync).