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 11567 - IndexedDB should utilize the new WebIDL static feature
Summary: IndexedDB should utilize the new WebIDL static feature
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: 2010-12-17 11:19 UTC by Jeremy Orlow
Modified: 2011-03-07 19:31 UTC (History)
3 users (show)

See Also:


Attachments

Description Jeremy Orlow 2010-12-17 11:19:23 UTC
Per Jonas:

To construct a key range a set of constructors are available. In
languages with interface objects [WEBIDL], these constructors are
available on the IDBKeyRange interface object. In other languages
these constructors are available through language specific means, for
example as static functions"

But I see that I forgot to say that the IDBKeyRangeConstructors
interface implements these constructors.

However WebIDL nowadays have support for "static" so there is no
longer a need for a separate interface. We should just do

interface IDBKeyRange {
   readonly attribute any     lower;
   readonly attribute any     upper;
   readonly attribute boolean lowerOpen;
   readonly attribute boolean upperOpen;

   static IDBKeyRange only (in any value);
   static IDBKeyRange lowerBound (in any bound, in optional boolean open);
   static IDBKeyRange upperBound (in any bound, in optional boolean open);
   static IDBKeyRange bound (in any lower, in any upper,
                                in optional boolean lowerOpen,
                                in optional boolean upperOpen);
};