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 22130 - Modification for IDBObjectStore's clear and delete method
Summary: Modification for IDBObjectStore's clear and delete method
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2013-05-22 03:28 UTC by Kyaw Tun
Modified: 2015-08-10 20:28 UTC (History)
5 users (show)

See Also:


Description Kyaw Tun 2013-05-22 03:28:44 UTC
Currently attention delete and clear method in object store are same. The only different is delete take an argument of key or key range, whereas clear do not take argument.

My proposal here to differentiate attention of delete and clear, such that clear method don't care about what effected records and delete method care about effected records.

Such that, clear method will take optional argument of either key or key range. 

Result of clear method is the same, i,e., return undefined.

Result of delete method change to number of records effected. Currently, it returns undefined.

This changes in API spec is backward compatible and also solve the problem of counting on delete as discussed in
Comment 1 Arthur Barstow 2013-06-11 18:06:29 UTC
Marked as an enhancement per Joshua's proposal in
Comment 2 Joshua Bell 2013-06-11 18:13:05 UTC
Not for the "V1" spec, so marking RESOLVED / LATER
Comment 3 Kyaw Tun 2013-06-13 12:33:31 UTC
Yes. I agree.
Comment 4 Joshua Bell 2015-08-10 20:28:57 UTC
Moved to