Re: Indexed Database API

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 UTC