IndexedDB: IDBObjectStore.delete and IDBCursor.delete should return undefined

RESOLVED FIXED

Status

()

Core
DOM: IndexedDB
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: sicking, Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

({dev-doc-complete})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

3.78 KB, patch
Ben Turner (not reading bugmail, use the needinfo flag!)
: review+
Details | Diff | Splinter Review
I.e. the .result of the returned request should be set to true if a record was deleted, and false otherwise.
Based on discussions at TPAC, I think we'll end up changing the spec here to always return undefined.
Summary: IndexedDB: IDBObjectStore.delete and IDBCursor.delete should return true/false indicating if something was removed → IndexedDB: IDBObjectStore.delete and IDBCursor.delete should return undefined
Woo! Otherwise we were going to have to hack something into mozStorage to expose the data we need from SQLite.
(In reply to ben turner [:bent] from comment #2)
> Woo! Otherwise we were going to have to hack something into mozStorage to
> expose the data we need from SQLite.

http://www.sqlite.org/c3ref/changes.html
Created attachment 572706 [details] [diff] [review]
Patch, v1

Has r=sicking.
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #572706 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/966c69671224
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Comment 6

6 years ago
(In reply to ben turner [:bent] from comment #3)
> (In reply to ben turner [:bent] from comment #2)
> > Woo! Otherwise we were going to have to hack something into mozStorage to
> > expose the data we need from SQLite.
> 
> http://www.sqlite.org/c3ref/changes.html

I had to add this for Files in IndexedDB
Keywords: dev-doc-needed
Target Milestone: --- → mozilla10
I'm trying to document this. I have a question.

As both in the published spec (TR) and the editor's draft give an IDBRequest as the result for the two method, could you confirm that it is the IDBResult.result that really returns undefined?

Thank you in advance
Yes, that's correct. For all database operations the "result" is retrieved through IDBRequest.result once the success event is fired.
I updated:
https://developer.mozilla.org/en/IndexedDB/IDBObjectStore#delete%28%29
https://developer.mozilla.org/en/IndexedDB/IDBCursor#delete%28%29

and of course
https://developer.mozilla.org/en/Firefox_10_for_developers#section_8
Keywords: dev-doc-needed → dev-doc-complete
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla10 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.