On Dec 17, 2008, at 3:53 AM, Harish Vishwanath wrote:
> Hello, > > Thanks for the suggestion. As you mentioned , it will be difficult > handle Transactional state issues. Is there a way to find out if the > session is in active transaction or in the middle of a flush/query? there is, session.is_active tells if its in a transaction, session._flushing indicates its within a flush. > I read in the docs that identity_map by default is self pruning. > When the gc clears unreferenced objects, session automatically > removes those objects. Is there a way to access this behavior of the > session directly (that is not waiting till the gc kicks in?) you could import gc and say gc.collect(). If you wanted to control it entirely, you can use a strong-referencing identity map and call session.prune(). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. 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 -~----------~----~----~----~------~----~------~--~---