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

[Bug 11401] New: [IndexedDB] We should disallow .transaction() from within setVersion transactions

From: <bugzilla@jessica.w3.org>
Date: Wed, 24 Nov 2010 21:16:53 +0000
To: public-webapps@w3.org
Message-ID: <bug-11401-2927@http.www.w3.org/Bugs/Public/>

           Summary: [IndexedDB] We should disallow .transaction() from
                    within setVersion transactions
           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: jorlow@chromium.org
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-webapps@w3.org

We should disallow .transaction() from within setVersion transactions. 
Otherwise things like this can become confusing:

db.setVersion('1').onsuccess(function () {
  trans = db.transaction('a');
  trans.objectStore('a').put('foo', 'bar');


db.setVersion('1').onsuccess(function () {
  thisTrans = event.result;
  trans = db.transaction('a');
  trans.objectStore('a').put('foo', 'bar');

We could specify a bunch of complicated semantics, but it's much easier to just
say that .transaction() throws if called within a setVersion transaction.  Any
use case that needs to create a transaction within should be satisfied by doing
the work in an oncomplete handler for the setVersion transaction.

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 Wednesday, 24 November 2010 21:16:55 UTC

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