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

[indexeddb] Handing negative parameters for the advance method

From: Israel Hilerio <israelh@microsoft.com>
Date: Fri, 12 Aug 2011 21:34:48 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
CC: Jim Wordelman <jaword@microsoft.com>, Adam Herchenroether <aherchen@microsoft.com>, Victor Ngo <vicngo@microsoft.com>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D1FBE07@TK5EX14MBXC113.redmond.corp.microsoft.com>
Since advance is intended to always move the cursor forward, it seems we want to only support positive parameter values.  Therefore, I would suggest we change its signature to:

void advance (in unsigned int count);

If a developer specifies a negative number for it, we could throw an IDBDatabaseException with a value of NON_TRANSIENT_ERR.  A value of zero will do nothing.

I also noticed that the webIDL spec doesn't define int or unsigned int.  It seems we should be using long (for int) and unsigned long (unsigned int). 

Do you agree?

Received on Friday, 12 August 2011 21:35:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:23 UTC