W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

[Bug 11257] New: Should IDBCursor.update be able to create a new entry?

From: <bugzilla@jessica.w3.org>
Date: Mon, 08 Nov 2010 11:12:24 +0000
To: public-webapps@w3.org
Message-ID: <bug-11257-2927@http.www.w3.org/Bugs/Public/>

           Summary: Should IDBCursor.update be able to create a new entry?
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
        AssignedTo: dave.null@w3.org
        ReportedBy: jonas@sicking.cc
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-webapps@w3.org

What should happen in the following case:

db.transaction(["foo"]).objectStore("foo").openCursor().onsuccess = function(e)
  var cursor = e.result;
  if (!cursor)

  cursor.update({ id: 1234, value: "Benny" });

This situation can of course arrive in more subtle ways:

os = db.transaction(["foo"]).objectStore("foo");
os.openCursor().onsuccess = function(e) {
  var cursor = e.result;
  if (!cursor)

  cursor.update({ id: 1234, value: "Benny" });

As specified, IDBCursor.update behaves just like IDBObjectStore.put and just
creates a new entry, but this might be somewhat unexpected behavior.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Monday, 8 November 2010 11:12:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:13 UTC