No, it would only return the tuple if you had included the extraColumns argument in the select method call. Otherwise the behavior would be indentical to now, so all existing code would still work.
What, you think I'm crazy? ;) Oleg Broytmann wrote: > On Fri, Aug 04, 2006 at 07:22:46PM -0400, Sean McBride wrote: >> for obj, extraColumns in results: > > I hope you are not going to break all existing programs that iterate > over SelectResults? > > Oleg. Actually, you don't need to declare the extra columns in the Item class, since they're only around over the course of this select query. Include the extraColumns argument on the select and the resulting SelectResults lazy iterator would spit out (SQLObjectInstance, extraColumnsDict) tuples instead of just SQLObject instances. - Sean Oleg Broytmann wrote: > On Fri, Aug 04, 2006 at 04:47:25PM -0400, Sean McBride wrote: >> Item.select(Item.q.id==table.collection_item.item_id, >> extraColumns = [func.COUNT(Item.q.id)], >> groupBy = Item.q.id, >> orderBy = [DESC(func.COUNT(Item.q.id)),Item.q.name]) > > You've forgotten a way to declare the extra columns in the Item class. > > Oleg. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ sqlobject-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
