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
Status: RESOLVED MOVED
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-22 03:28 UTC by Kyaw Tun
Modified: 2015-08-10 20:28 UTC (History)
5 users (show)

See Also:


Attachments

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 http://lists.w3.org/Archives/Public/public-webapps/2013JanMar/0057.html
Comment 1 Arthur Barstow 2013-06-11 18:06:29 UTC
Marked as an enhancement per Joshua's proposal in http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0817.html
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 https://github.com/w3c/IndexedDB/issues/32