W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

RE: [indexeddb] Handling negative parameters for the advance method

From: Eliot Graff <Eliot.Graff@microsoft.com>
Date: Mon, 22 Aug 2011 21:30:11 +0000
To: Israel Hilerio <israelh@microsoft.com>, Jonas Sicking <jonas@sicking.cc>
CC: Aryeh Gregor <ayg@aryeh.name>, "public-webapps@w3.org" <public-webapps@w3.org>, Jim Wordelman <jaword@microsoft.com>, "Adam Herchenroether" <aherchen@microsoft.com>, Victor Ngo <vicngo@microsoft.com>
Message-ID: <CE3A5BFD1228D84A8D9C158EEC195FD53CCE93D5@TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com>

> >
> > Hmm.. Yeah, I suspect that is the better behavior here. We should
> > probably also throw if the number is 0.
> >
> > / Jonas
> 
> If a developer specifies zero as a value, we could throw an
> IDBDatabaseException with a value of NON_TRANSIENT_ERR.
> What about doing the same for negative values?
> 
> Israel
> 


For cursor.advance() in sync & async, I changed "count" parameter type to long and added NON_TRANSIENT_ERR:

Exception	                                                     Description
IDBDatabaseException	NON_TRANSIENT_ERR	The value passed into the count parameter was zero or a negative number.

Thanks,

Eliot
Received on Monday, 22 August 2011 21:30:39 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT