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

[whatwg] SQL API error handling

From: Geoffrey Garen <ggaren@apple.com>
Date: Tue, 16 Oct 2007 16:04:51 -0700
Message-ID: <35E752C9-96A9-47EA-A285-367877BBBDD5@apple.com>
> It would be nice to have a way to indicate to the script "There was  
> a catastrophic event and we reset your database, assume you're  
> starting over from scratch."

In general, I'm not sure how useful it is to know that you're  
"starting over from scratch," since any database query needs to check  
its result. Presumably, an app's behavior in the "no data" case is the  
same regardless of *why* there's no data. 99% of the time the behavior  
will be to reload the data from a server.

More importantly, what constitutes a corrupt database, and how to  
recover from it, are serious implementation details. Some  
implementations may have error correction algorithms. Others may have  
backups they can restore. Others may have to wipe the database  
completely and start over. Still others may not be able to start  
anything. (For example, the storage medium might have gone bad, or  
been locked or disconnected.) So, imposing a "start over from scratch"  
requirement would hamper some implementations while requiring the  
impossible of others.

Geoff
Received on Tuesday, 16 October 2007 16:04:51 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC