Michael Bayer wrote:
> 
> On Apr 4, 2008, at 3:46 PM, jason kirtland wrote:
> 
>> Michael Bayer wrote:
>>> On Apr 4, 2008, at 3:25 PM, jason kirtland wrote:
>>>
>>>> How about keeping it explicit:
>>>>
>>>> query(A.id, Node.name) -> ok
>>> this is not OK since you'll get a cartesian product from A and Node.
>> that's exactly what i intended.
> 
> Well, I dont really think Query even needs to support returning  
> cartesian products.    I'd hate to organize the API around a  
> nonexistent usecase and force an extra method call for the other 100%  
> of them.

It's not really about Cartesian products- query(Node.id, Node.name) is 
similarly valid and would be fine as long as no relations are required. 
  if relations are needed, you could do either an explicit mapper 0 
specification or just use an entity up front and choose columns at the 
end: query(Node).values(Node.id, Node.name).  i think the basic 
relational nature of the query and a trailing .values() are somewhat 
orthogonal, so long as the .values() takes it's pool of possible columns 
from the current state of the query.



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

Reply via email to