Michael Bayer ha scritto:
> On May 2, 2007, at 11:23 AM, Glauco wrote:
>
>   
>> Example:
>>
>> create table  people (
>> name text,
>> surname text,
>> type CASE 'A','B','C'
>> )
>>
>>
>> There is no solution to do for example the simple query based over  
>> the mapper People:
>> select count(type) from people group by type;
>>
>>     
>
> first of all, i dont understand why youd want to GROUP BY a column  
> used in an aggregate.  but anyway:
>
> select([func.count(People.c.type)], group_by=[People.c.type])
>
>   
this is exactly what i intend for " select function"  ...
where is the uncoompresion?

this is the response to the simple question how many A,,B,C-person do i 
have in my DB ?

>> only solution is to use the select functioon.
>>     
>
> i fail to see why thats a problem.  if you want a SELECT to return  
> tuple results, it follows that you should use select().
>
>
>   

is not a problem if you can use the select funcion , otherway getting 
this information from mapper is impossible.


Glauco


-- 
+------------------------------------------------------------+
                                  Glauco Uri - Programmatore
                                    glauco(at)allevatori.com 
                               
  Sfera Carta Software®      [EMAIL PROTECTED]
  Via Bazzanese,69  Casalecchio di Reno(BO) - Tel. 051591054 
+------------------------------------------------------------+



--~--~---------~--~----~------------~-------~--~----~
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