Re: [appengine-java] Re: Date based sorting and result pagination

2010-06-10 Thread RAVINDER MAAN
I am using JDO .So which option is best cursors or setRange? On Wed, Jun 9, 2010 at 1:47 PM, Nacho Coloma icol...@gmail.com wrote: You should specify if you are using JDO, JPA or other. SimpleDS has a PagedQuery implementation that can be ported to your own environment. Look for

[appengine-java] Re: Date based sorting and result pagination

2010-06-10 Thread Nacho Coloma
Cursors is the best choice, but they can only be used to paginate forward. You will have to use your own hacks to allow more than one page. setRange() is more flexible, but should give you worse performance. On Jun 10, 3:27 pm, RAVINDER MAAN rsmaan...@gmail.com wrote: I am using JDO .So which

Re: [appengine-java] Re: Date based sorting and result pagination

2010-06-10 Thread RAVINDER MAAN
Thanks Ravi .. So nice of you. On Fri, Jun 11, 2010 at 12:37 AM, Ravi Sharma ping2r...@gmail.com wrote: you are already sorting on date..and that can be best candidate for paging too but u may need indexes in both direction(asc,desc) for creation date. lets say ur entity has fololowing

Re: [appengine-java] Re: Date based sorting and result pagination

2010-06-10 Thread Ravi Sharma
you are already sorting on date..and that can be best candidate for paging too but u may need indexes in both direction(asc,desc) for creation date. lets say ur entity has fololowing prooerty on which u will fliter propA propB creationData so u will write basic query like select * from

[appengine-java] Re: Date based sorting and result pagination

2010-06-09 Thread klonq
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html On Jun 9, 7:36 am, RAVINDER MAAN rsmaan...@gmail.com wrote: Hello all     how can i get my query result sorted based on creationdate and also i want to do pagination for the same.what is the best way to do that.can

[appengine-java] Re: Date based sorting and result pagination

2010-06-09 Thread Nacho Coloma
You should specify if you are using JDO, JPA or other. SimpleDS has a PagedQuery implementation that can be ported to your own environment. Look for getFetchOptions() in this link: http://code.google.com/p/simpleds/source/browse/trunk/src/main/java/org/simpleds/PagedQuery.java This will only