On Fri, Aug 03, 2007 at 08:51:33PM +0200, Johan Carlsson wrote:
> Oleg Broytmann wrote:
> >    Luke Oppermann did a unification in the trunk and merged SelectResults,
> > Select() and dbconnection.queryForSelect(). Now Select() is the
> > lowest-level API that implements all features - joins, slices, distinct,
> > - and SelectResults uses Select().
> >    Does it solve you problems (in a different way)?
> >   
> Well, partly (because it's those changes I use to override to get my 
> classes working).
> 
> But if I understand the code correctly I still have to submit a 
> SQLObject derived class as the sourceClass to SelectResults?

   Yes.

> And I've revised the code and there is no way to set a custom "items" 
> attribute for the Select.

   There is "items" parameter in sqlbuilder.Select(). There is no "items"
in SelectResults as SelectResults is meant to be used with one table.

> (another of topic issue, that I should maybe post seperate?)
> There are some comments in the SelectResults code (e.g. in the count metod)
> 
>             # Column must be specified, so we are using unique ID column.
>             # COUNT(DISTINCT column) is supported by MySQL and PostgreSQL,
>             # but not by SQLite. Perhaps more portable would be subquery:
>             #  SELECT COUNT(*) FROM (SELECT DISTINCT id FROM table)
> 
> Well making it a subquery makes huge sense

   The problem is to debug the subquery on all the supported platforms. Or
we have to do this conditionally - branch on connection.dbName and use
subquery only on the platforms we can test.

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
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to