The new behavior is exactly what I expect, namely that query.count()
returns the same as len(query.all()). Are there cases in which this
does not make sense or where this would not work?
-- Christoph
--~--~-~--~~~---~--~~
You received this message because you are
it should be fine.
On Nov 10, 2008, at 6:34 AM, Cito wrote:
The new behavior is exactly what I expect, namely that query.count()
returns the same as len(query.all()). Are there cases in which this
does not make sense or where this would not work?
-- Christoph
On 8 Nov., 22:03, Michael Bayer [EMAIL PROTECTED] wrote:
oh sorry, also count() is meant to count instances of a single kind of
object. So in fact you should be saying:
session.query(UserRss).join(Rss, item).count()
This question is actually coming from the TurboGears group. The
problem
On Nov 9, 2008, at 4:46 AM, Cito wrote:
On 8 Nov., 22:03, Michael Bayer [EMAIL PROTECTED] wrote:
oh sorry, also count() is meant to count instances of a single kind
of
object. So in fact you should be saying:
session.query(UserRss).join(Rss, item).count()
This question is actually
On Nov 9, 2008, at 9:39 AM, Michael Bayer wrote:
On Nov 9, 2008, at 4:46 AM, Cito wrote:
On 8 Nov., 22:03, Michael Bayer [EMAIL PROTECTED] wrote:
oh sorry, also count() is meant to count instances of a single kind
of
object. So in fact you should be saying:
it doesn't know which class on the left side you'd like to join
from. so its looking for:
sess.query(A, B, C).join((B, A.bs), (C, B.cs))
alternatively, instead of A.bs etc. you can spell out the join
condition such as A.b_id==B.id in each tuple.
On Nov 8, 2008, at 3:03 PM, Greg wrote:
oh sorry, also count() is meant to count instances of a single kind of
object. So in fact you should be saying:
session.query(UserRss).join(Rss, item).count()
On Nov 8, 2008, at 3:03 PM, Greg wrote:
This following request works fine and produce the result I was
expecting
here's the new error message in the latest trunk:
InvalidRequestError: Can't issue count() for multiple types of objects
or columns. Construct the Query against a single element as the thing
to be counted, or for an actual row count use
Query(func.count(somecolumn)) or