W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2011

Re: Indexed Database API

From: Jeremy Orlow <jorlow@chromium.org>
Date: Fri, 4 Mar 2011 10:33:56 -0800
Message-ID: <AANLkTimNJutZApd_A5qVUT8ki+YxCdOLuW8RZUw32xg4@mail.gmail.com>
To: Ben Dilts <ben@lucidchart.com>
Cc: public-webapps@w3.org
On Tue, Mar 1, 2011 at 11:02 PM, Ben Dilts <ben@lucidchart.com> wrote:

> Why is there no mechanism for paging results, a la SQL's "limit"?  If I
> want entries in positions 140-159 from an index, I have to call continue()
> on a cursor 139 times, which in turn unserializes 139 objects from my store
> that I don't care about, which in FF4 is making a lookup in IndexedDB
> sometimes take many seconds for even a few records.  It makes no sense--am I
> just missing something in the spec?


Just use cursor.continue() with a key parameter to skip the cursor ahead to
where you care about.

J
Received on Friday, 4 March 2011 19:05:12 GMT

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