Re: [Sqlalchemy-users] using func.count with session

2006-08-10 Thread Andrija Zaric
On 10/08/06, Brad Clements <[EMAIL PROTECTED]> wrote: ... > I'll just use connection.execute() I guess.. But I'm curious if this is a > docs issue, or > I'm doing something wrong. Argument for session.query(...).select(arg) is just a criterion for selecting the objects from the database, so you c

[Sqlalchemy-users] using func.count with session

2006-08-09 Thread Brad Clements
I'm trying to determine how many records are in a table I'm looking at: http://www.sqlalchemy.org/docs/sqlconstruction.myt#sql_whereclause_functions I tried this: order.priority = \ session.query(Order).select([func.count(Order.c.id)]).execute()[0][0]+1 I get: update_order_accpac_info orde