On Tue, Aug 07, 2007 at 11:02:25PM +0200, Johan Carlsson wrote:
> def count(self):
> """ Counting elements of current select results """
> assert not self.ops.get('limit'), "'limit' is meaningless with
> 'distinct'" <=====
>
> Is that that really right? Shouldn't it test for "distinct" also?
It's a typo. LIMIT is meaningless with COUNT, not DISTINCT (because LIMIT
will be applied after COUNT and COUNT returns only one row.)
> And when limit is "sqlobject.sqlbuilder.NoDefault" it triggers, what's
> up with that?
> It only seems to allow count if limit=0!?
Or None. ;)
> Bug?
Probably, though it's strange nobody has stumbled upon it yet.
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED]
Programmers don't die, they just GOSUB without RETURN.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss