[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-18 Thread bool
Thanks Michael. But this wont probably work if I want to find the columns within @Compiles(Insert) I have a use-case for the below. Can you help @compiles(Insert) def contextual_insert(insert, compiler, **kw): print insert.compile().params- This will

Re: [sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-18 Thread Michael Bayer
On Apr 18, 2011, at 6:56 AM, bool wrote: @compiles(Insert) def contextual_insert(insert, compiler, **kw): print insert.compile().params- This will gointo infinite loop. return compiler.visit_insert(insert, **kw) OK this is useful detail, that you're

[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread empty
On Apr 15, 11:55 am, Michael Trier mtr...@gmail.com wrote: Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? The attributes.get_history method will return this information to you as a History record for

[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread empty
On Apr 15, 7:03 am, bool manohar.kod...@gmail.com wrote: Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? t = Table(abc, MetaData(conn), Column(x, String), Column(y, Integer)) u = t.update().values(x='a')