I've some problem in 'count' function over a simple select table.
In [62]: print select([tbl['azienda'].c.id], tbl['azienda'])
*SELECT azienda.id FROM azienda*
This is perfect but when i try to use count function the SQL composer
try to do an expensive sql.
In [63]: print select([tbl['azienda'].c.id], tbl['azienda']).count()
*SELECT count(id) AS tbl_row_count
FROM (SELECT azienda.id AS id
FROM azienda)*
Another question:
Does anyone know how to use this object ?
select([tbl['azienda'].c.id], tbl['azienda']).count()
<sqlalchemy.sql.Select object at 0xb6c803ac>
In the mapper.count() version i get correctly rowcount ...
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---