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.

Thoughts?

Thanks,
~Brady
Received on Tuesday, 27 November 2007 13:56:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:42 GMT