Luke Plant wrote:
>
> Now I'm not sure either, looking back at the posts :-)
>
> Some people (e.g. Joseph) were definitely thinking in terms of doing a
> UNION or UNION ALL in SQL. For 'UNION', I think the ORM constrains you
> to using a single model, and therefore a single table, in which c
On Monday 08 May 2006 12:17, Michael Radziej wrote:
> Sorry for the long delay, your posting confused me about what I want
> ;-)
>
> My original intentions are completely different from Luke's. I really
> need a function that builds the union over any list (or any
> iterator). Perhaps an example
Hi,
ticket 1803 implements a set like interface for union/intersection, such as
aQuerySet.union(otherQuerySet)
ticket 1807 implements my original idea under the name list_union,
list_intersection, such as
QuerySet.union(listOfQuerySets)
comments appreciated ;-)
Michael
--~--~-~--~
Luke Plant wrote:
> On Friday 05 May 2006 12:47, Michael Radziej wrote:
>> Hi,
>>
>> what about providing class functions QuerySet.union(cls, qset_list),
>> QuerySet.intersection(cls, qset_list), both returning cls, such as:
>>
>> def union(cls, qset_list):
>> """Returns the union of a list of
On Friday 05 May 2006 12:47, Michael Radziej wrote:
> Hi,
>
> what about providing class functions QuerySet.union(cls, qset_list),
> QuerySet.intersection(cls, qset_list), both returning cls, such as:
>
> def union(cls, qset_list):
> """Returns the union of a list of QuerySets, a QuerySet."""
On 5/5/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
>
> what about providing class functions QuerySet.union(cls, qset_list),
> QuerySet.intersection(cls, qset_list), both returning cls, such as:
>
> def union(cls, qset_list):
> """Returns the union of a list of QuerySets, a QuerySet."""
>
On 5/5/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
> what about providing class functions QuerySet.union(cls, qset_list),
> QuerySet.intersection(cls, qset_list), both returning cls, such as:
>
> def union(cls, qset_list):
> """Returns the union of a list of QuerySets, a QuerySet."""
>
Hi,
what about providing class functions QuerySet.union(cls, qset_list),
QuerySet.intersection(cls, qset_list), both returning cls, such as:
def union(cls, qset_list):
"""Returns the union of a list of QuerySets, a QuerySet."""
return reduce(cls.__or__, qset_list)
union = classmethod(un