Here is an example of what I am using.

   def current_worksheets(self):
        worksheets = []
        supervision = self.current_supervision()
        for i in supervision:

            worksheets.append(i.contract.worksheets.filter('status =
','pending').fetch(1000))
        worksheets = sorted(itertools.chain(*worksheets),key=lambda
x:x.start_date)

        return worksheets

Rgds

T

On Apr 30, 1:04 am, Lenny Rachitsky <[email protected]> wrote:
> I ran into the lack of support for complex OR queries, and am
> attempting to run multiple queries which I want to merge into a single
> Iteratable. Is that possible? Here's basically I'm I'm trying to do:
>
> buckets1 = db.GqlQuery("SELECT * FROM table WHERE brand=:1 AND year = :
> 2 AND day_of_year = :3 AND minute_of_day >= :4", brand, year_start,
> day_of_year_start, minute_of_day_start)
>
> buckets2 = db.GqlQuery("SELECT * FROM TweetHistoryBuckets WHERE brand=:
> 1 AND year = :2 AND day_of_year = :3 AND minute_of_day < :4", brand,
> year_start, day_of_year_end, minute_of_day_end)
>
> Now that I have two buckets of queries, I'd like to iterate through
> the results in a single look, instead of two separate loops. Is there
> a good approach to this?
>
> Thank you in advance.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" 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 
> athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en.

Reply via email to