On Nov 13, 2007, at 12:24 PM, svilen wrote:
> > what a coincidence, 2 days ago we stepped on this bindparam-types > thing; table.some_decimal_column == decimal.Decimal(5) did not always > work. > > now it mostly works, i think there is one more case that breaks for > me: when the column itself is hidden in a function. > e.g. > table_A = Table( 'Nalichnost', meta, > Column( 'db_id', primary_key= True, type_= Integer, ), > Column( 'price', Numeric(precision=10,length=2,asdecimal=True), ), > ) > > print session.query( A).filter( > (func.coalesce( A.price, 0) ==Decimal( 1)) > ).all() do this for now: func.coalesce(A.price, 0, type_=Decimal) we have a "generic functions" ticket that eventually will make well known functions like "coalesce" smart enough to know that the return type should be taken from argument one. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---