W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2007

[whatwg] SQL API and openDatabase()

From: Brady Eidson <beidson@apple.com>
Date: Tue, 27 Nov 2007 13:56:36 -0800
Message-ID: <6405C6C6-19B6-400D-9E53-873A41B53158@apple.com>
In the provided spec, openDatabase() can fail in exactly one case,  
leading to an exception:
"If the database version provided is not the empty string, and the  
database already exists but has a different version, then the method  
must raise an INVALID_STATE_ERR exception."

For the sake of providing implementation feedback, I'd like to add  
another specified failure condition:
If the user agent decides for policy reasons that a database should  
not be opened/created (the origin's quota has already been met/ 
exceeded, the user has disabled databases altogether, etc), there  
should be an exception.

For the sake of argument, I can't think of any existent error code  
that works better than INVALID_STATE_ERR.  NO_DATA_ALLOWED_ERR fits  
based on name alone, but not based on intended use.


Received on Tuesday, 27 November 2007 13:56:36 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:59 UTC