> > For this case, I only wanted it applied to the column spec, not the WHERE, > but I don't think this is currently possible to differentiate this and > compile differently in each location... or is it? I looked into > compiler.statement et al to figure out the compilation context, but could > not. > > it is, you need to look in the **kw passed to your custom compile function > for the flag "within_columns_clause=True", which indicates it's rendering > the columns clause. >
Argh - sorry... I did dig around a lot for a way to detect that, but didn't see that. That works very nicely. Thanks! -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/JvKeDe_pw5gJ. 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.