On May 3, 2011, at 12:12 PM, bool wrote:

> Thanks Mike for your views. Basically I wanted to execute the
> statement explicitly along with the other updates I wanted to do in a
> transaction and return None.

I'm gathering, even though it hasn't been specified throughout these messages, 
that you are not using the ORM - particularly that you want execute() to return 
None which is not its usage contract and would not be compatible with the ORM.  
   So that makes the job much easier - you're looking here for a simple facade 
around the execution of a statement that does what you need, including 
transaction management, other related statements.     This is easy enough to 
build as a callable object or function that receives a statement and does 
what's needed, delegating only actual SQL executions to a Connection that is 
established within a transaction (i.e. using connection.begin()).    
Conditional execution and such is too much to pack into the internals of 
execute() itself.


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to