Re: Re[4]: [Sqlalchemy-users] CASE in column list

2006-05-16 Thread Rick Morrison
I've been through the internals a bit, and this direction sounds like the way to go, but I understand that there's going to be a bit of refactoring for 0.2. I'd want Mike in on this for an opinion, anyway. Copying him on this message -- what's up with the list for you guys? Seems to be working OK f

Re: Re[4]: [Sqlalchemy-users] CASE in column list

2006-05-15 Thread Rick Morrison
OK, this patch against trunk r#1455 works with your testcase. It defines a new CalculatedClause() class similar to that of Function(), and refactors Function() to derive from this new class. Also adds new visit_calculatedclause() function to handle the compile-time part. It requires the use of l

Re: Re[4]: [Sqlalchemy-users] CASE in column list

2006-05-15 Thread Michael Bayer
seems to work, committed in the trunk + merge to 0.2, test case is test/case_statement.pyOn May 15, 2006, at 7:22 PM, Rick Morrison wrote:OK, this patch against trunk r#1455 works with your testcase. It defines a new CalculatedClause() class similar to that of Function(), and refactors Function()

Re[4]: [Sqlalchemy-users] CASE in column list

2006-05-14 Thread Gambit
Hey Rick, Basically the issue as I see it is that whatever decides that something is a 'column', and thus part of the result set, doesn't (for the obvious reasons) know what to do with the CompoundClause. Now this might be rectified as simply as implementing a new class, say, arbitrarily, 'Calcul