Re: SQLAlchemy 0.3 transactions inside Pylons controllers

2007-09-09 Thread askel
i'm just wondering if rollback should be called if commit fails, i.e. if there is difference between: try: ... except: t.rollback() else: t.commit() and try: ... t.commit() except: t.rollback() On Sep 8, 6:23 am, Jose Figueras [EMAIL PROTECTED] wrote: t =

Re: SQLAlchemy 0.3 transactions inside Pylons controllers

2007-09-08 Thread Jose Figueras
t = context.session_context.current.create_transaction() try: ... (some db or models operations and flush() invocations) t.commit() except: t.rollback() ... (optionally, raise some user or system exception) Jose F. On 7 sep, 00:38, Jose Figueras [EMAIL PROTECTED] wrote: In one of

SQLAlchemy 0.3 transactions inside Pylons controllers

2007-09-06 Thread Jose Figueras
In one of my controller I need to use SQLAlchemy transactions. How must I proceed? Where's the transaction object? Regards, Jose F. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post