Closed Bug 696914 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: Storage: IndexedDB, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: bent.mozilla)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

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
Attached patch Patch, v1Splinter Review
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
Closed: 13 years ago
Resolution: --- → FIXED
(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
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.
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.

Attachment

General

Created:
Updated:
Size: