Re: [SQLObject] RFC: tuple values from selectResults
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: David M. C. <da...@da...> - 2005-05-07 04:39:10
|
On Thu, May 05, 2005 at 01:05:59PM -0500, Ian Bicking wrote: > First issue with the patch, of course, is that it would need tests. I > myself would probably have started with tests, just because you have to > do something to excersize the code anyway. Tests? You really know how to throw a wet blanket over my hacking fun, don't you ;} However, I do think I will check in the two line change so that Iteration doesn't freak out when it gets a ID of None, as can happen often when you do an outer join. > For the implementation, I'd be more comfortable if this was separated > into two classes, probably one inheriting from the other (or some > abstract class). My initial thought is that maybe what is now > SelectResults should inherit from a new class, that implements the more > general case of selecting multiple classes. Or, maybe > sqlobject.SQLObject.select() could just call sqlobject.select() and do a > little filtering (using a generator) of the output. Hrm... well, maybe > not, because the return value of SQLObject.select() is manipulable. So > a subclass seems most appropriate. Yeah, eventually it should be symmetrical like this. I'll try working on this again in another few weeks, with the tests this time. Dave Cook |