Your right you could use the cast operator so you could do something like:
Session.query(Obj).filter(sqlalchemy.sql.cast(Obj.float_col, sqlalchemy.Integer)==1)
Not sure about your second question. On 07/27/2010 08:49 AM, Jon Nelson wrote:
I have two questions: 1. I'm using postgresql, and I sometimes need to do column type conversions. In postgresql, this is normally done with the ::FOO operator where FOO is a data *type*. Somtimes, but not usually, these data types are also available in function-like factories, but in this case that doesn't help me. SHould I use the cast(some_column, 'int') expression here?
-- David Gardner Pipeline Tools Programmer Jim Henson Creature Shop dgard...@creatureshop.com -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.