Unfortunately, a GqlQuery just constructs a Query behind the scenes.
In other words, they're functionally equivalent and what is disallowed
by Query is similarly disallowed by GqlQuery.


On Oct 14, 7:18 pm, kang <[EMAIL PROTECTED]> wrote:
> maybe you can write GQL like:
>
> SELECT * FROM <kind>
>     [WHERE <condition> [AND <condition> ...]]
>     [ORDER BY <property> [ASC | DESC] [, <property> [ASC | DESC] ...]]
>     [LIMIT [<offset>,]<count>]
>     [OFFSET <offset>]
>
>
>
> On Wed, Oct 15, 2008 at 6:38 AM, mrchucho <[EMAIL PROTECTED]> wrote:
>
> > Let's say I have blog and I want to fetch the top 10 posts created in
> > the last 48 hours with the most comments and display them in order of
> > comment count. I would expect to be able to do something like:
>
> > Post.all().filter("created >=", datetime.today() -
> > timedelta(hours=48)) \
> >              .order("-comment_count") \
> >              .fetch(10)
>
> > But this won't work because "First ordering property must be the same
> > as inequality filter property". Any idea how to implement something
> > like this? The only thought I had was to remove the order clause,
> > fetch EVERYTHING, then sort them in-memory and return a 10 item
> > slice...
>
> --
> Stay hungry,Stay foolish.
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to