limodou wrote:

Sometimes I just want to count the number of records which match the
condition, I want to know is there a count function? Or think about to
implement one?
From the doco (http://sqlalchemy.org/docs/sqlconstruction.html#sql_select_functions):

        select([func.count(users.c.user_id)]).execute()

which results in :
        
        SELECT count(users.user_id) FROM users

HTH

Robert



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to