[sqlalchemy] func type_ not being used

2010-08-03 Thread Bryan
This returns a Decimal type for c2, which is what I want: c1 = literal(5, type_=Numeric) c2 = func.sum(c1, type_=Numeric) This returns a Float type for c2, but I'm telling c1 that it is a Numeric. How can I get a decimal returned when using an if function? c1 = func.if_(Table.foo != None,

Re: [sqlalchemy] func type_ not being used

2010-08-03 Thread Michael Bayer
On Aug 3, 2010, at 2:56 PM, Bryan wrote: This returns a Decimal type for c2, which is what I want: c1 = literal(5, type_=Numeric) c2 = func.sum(c1, type_=Numeric) This returns a Float type for c2, but I'm telling c1 that it is a Numeric. How can I get a decimal returned when using an if