[Bug 18502] New: [IndexedDB] Editorial: Wording around IDBFactory.open() with no version misleading

https://www.w3.org/Bugs/Public/show_bug.cgi?id=18502

           Summary: [IndexedDB] Editorial: Wording around
                    IDBFactory.open() with no version misleading
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
        AssignedTo: dave.null@w3.org
        ReportedBy: jsbell@chromium.org
         QAContact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org


The second paragraph reads:

"If no version is specified and a database exists, use the current database
version and follow the steps for opening a database. If no version is specified
and no database exists, set database version to 1, follow the steps for opening
a database, and return a database without object stores."

The most glaring issue is the final phrase, "return a database without object
stores" - the function returns an IDBRequest, not a database.  The intent is
also redundant with step 4 of the "Steps for opening a database".

The phrase "set database version to 1" may also be misleading. More correctly
it should follow the phrasing used in the first paragraph which define the
inputs to the steps, e.g. "If no version is specified and no database exists,
let /origin/ be the origin of the IDBEnvironment used to access this
IDBFactory, let /name/ be the name parameter passed to this function, and let
/version/ be 1."

(There also seems to be some ambiguity about what happens if open() is called
without a version but is delayed by a deleteDatabase(); the delete should
happen first, but does the open() use the version the database had prior to the
delete? If so, that's a little odd. If not, then the version can't logically be
determined at this point in the spec, and must be deferred to the "Steps for
opening" e.g. by having the /version/ be null with special cases. I may just be
missing something in the spec, though.)

-- 
Configure bugmail: https://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, 8 August 2012 16:18:20 UTC