Hi, 1. Probably doable by generating the mapped class on the fly, if you insist, but I don't see a reason to.
2. I would certainly rather do it with a function (which you can make a class method if you want to, sure). This is a normal app-level query, after all. - Gulli -- 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 sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.