On Sun, Dec 09, 2007 at 08:36:52PM +0100, Petr Jake?? wrote: > On Dec 9, 2007 6:28 PM, Oleg Broytmann wrote: > > Use sqlbuilder.Select() from the trunk - it supports all > > features of .select() (actually, .select() is reimplemented in the trunk > > by > > means of sqlbuilder.Select()). > > Can you please give me a short example. The documentation ( > http://www.sqlobject.org/SQLBuilder.html) does not describe the > sqlbuilder.Select() method.
class Select declared in http://svn.colorstudy.com/SQLObject/trunk/sqlobject/sqlbuilder.py as class Select(SQLExpression): def __init__(self, items=NoDefault, where=NoDefault, groupBy=NoDefault, having=NoDefault, orderBy=NoDefault, limit=NoDefault, join=NoDefault, lazyColumns=False, distinct=False, start=0, end=None, reversed=False, forUpdate=False, clause=NoDefault, staticTables=NoDefault, distinctOn=NoDefault) It generates a SELECT clause which you have to execute via your connection: rows = connection.queryAll(connection.sqlrepr( Select([MyTable.q.col1, MyTable.q.col2], distinct=True) )) Oleg. -- Oleg Broytmann http://phd.pp.ru/ [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss