Closed Bug 1358702 Opened 7 years ago Closed 5 years ago

IDBObjectStore.put should recommend calling cursor.update instead, if you want to modify a record that you have a cursor to

Categories

(Developer Documentation Graveyard :: API: IndexedDB, enhancement, P5)

All
Other
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mstange, Assigned: cmills)

References

()

Details

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

If you have a cursor to the record you want to change, cursor.update(modifiedRecord) is preferable to objectStore.put(modifiedRecord, cursor.primaryKey), because doing so makes it much clearer that an update is going to happen instead of an insert. The documentation should mention this fact.
Component: General → API: IndexedDB
Note added!
Assignee: nobody → cmills
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.