Re: [sqlalchemy] Column type in select w/ if condition

2010-03-30 Thread Mariano Mara
Excerpts from Bryan's message of Tue Mar 30 11:27:57 -0300 2010: > The underlying column returns a Decimal object when queried regularly, > and when summed as follows: > > select([ mytable.c.hours ]) > >>>Decimal("1.0") > select([ func.sum(mytable.c.hours) ]) > >>>Decimal("1.0") > > ...but when I

[sqlalchemy] Column type in select w/ if condition

2010-03-30 Thread Bryan
The underlying column returns a Decimal object when queried regularly, and when summed as follows: select([ mytable.c.hours ]) >>>Decimal("1.0") select([ func.sum(mytable.c.hours) ]) >>>Decimal("1.0") ...but when I sum it w/ an if statement, it returns a float: select([ func.sum(func.if_(True, m