Hi Devel63,
On Tue, Aug 25, 2009 at 4:32 AM, Devel63 <danstic...@gmail.com> wrote:

>
> It would make my paging code a lot cleaner if there were a way to
> indicate 'the first key'.  Is there?  Like db.Key.from_path
> (MyModel.kind(), "") when using key_names?
>
> That way, I could compile my GQL and just keep plugging in a new :key
> value each iteration, including the first.


Have you considered constructing your queries programmatically? Using the
Query class, this is easy:

q = MyModel.all().order('__key__')
if start_key:
  q.filter('start_key >', start_key)
...


>
> I know, the example cases always look clean with their starting query,
> and then the follow-ups, but in real life I sometimes find myself
> pretty nested with various logic clauses such that it would be nice to
> just be able to do this.
> >
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to