No, setExtend(-20, 0) won't work. What you'll have to do is find the first
element in your query and construct the reverse query for all elements less
than the current first element. You then have cursors going the other way.
Note that you'll need an index for the opposite direction.

On Thu, Apr 29, 2010 at 2:23 PM, ljw1001 <[email protected]> wrote:

> Use limit and offset on the query filter to do your paging
>
> Sent from my iPhone
>
>
> On Apr 29, 2010, at 4:37 PM, brendan <[email protected]> wrote:
>
>  If it did, this would be useful when the user selects to display the
>> previous page.
>>
>> On Apr 30, 6:17 am, korey_sed <[email protected]> wrote:
>>
>>> I wonder if the java datastore API's cursor is a forward only cursor
>>> or not?  if not, how do you go back?
>>>
>>> q.setExtend(-20,0) //to get the previous 20?
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected]<google-appengine-java%[email protected]>
>>> .
>>> For more options, visit this group athttp://
>>> groups.google.com/group/google-appengine-java?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<google-appengine-java%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
Ikai Lan
Developer Relations, Google App Engine
Twitter: http://twitter.com/ikai
Delicious: http://delicious.com/ikailan

----------------
Google App Engine links:
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to