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, mytable.c.hours, 0)) ])
>>>1.0
How can I control the return type of that summed if column?
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en.