Re: [sqlalchemy] Update object with results of a server-side processing [pgsql]

2013-04-02 Thread Alexey Vihorev
Wonderful! Thanks a lot. 2013/4/2 Michael Bayer > The insert() construct supports a call called returning() to emit whatever > RETURNING you want, but if you're using the ORM, then the insert() > construct is generated by your mappings. In this case, the ORM right now > favors being able to ba

Re: [sqlalchemy] Update object with results of a server-side processing [pgsql]

2013-04-01 Thread Michael Bayer
The insert() construct supports a call called returning() to emit whatever RETURNING you want, but if you're using the ORM, then the insert() construct is generated by your mappings. In this case, the ORM right now favors being able to batch the INSERT statements together into an executemany(),

[sqlalchemy] Update object with results of a server-side processing [pgsql]

2013-04-01 Thread Alexey Vihorev
Hi! I've got a server-side trigger function (before insert) - it changes some fields of the inserted record, and I need this info back in my SA entity object (akin to what SA does with ID's). SA uses RETURNING whenever it is supported, maybe I can use it as well? Or am I limited to refreshing the