Hi there -
expunge_all() and rollback() do different things, and both have a purpose. As far as what will "suffice" it depends on what exactly it is that you are attempting to accomplish.
I would also note that calling session.close() has the same effect as that of the two statements above.
A typical reason one might want to use both is so that any Python objects which are attached to this Session are no longer attached, and as such when their unloaded attributes are accessed, no SQL statement or implicit transaction will be started again on the original Session.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
---
You received this message because you are subscribed to the Google Groups "sqlalchemy" group.