diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-02-23 16:30:09 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-02-23 16:30:09 -0500 |
| commit | 948b14b65b961c68c6581419ae419fe68273fe2c (patch) | |
| tree | 4eeb5d68187b434a248bd4cb713e5477e2e07eeb /lib/sqlalchemy/orm/session.py | |
| parent | 122ae490655b13b550c333ed583b735d782bb943 (diff) | |
| download | sqlalchemy-948b14b65b961c68c6581419ae419fe68273fe2c.tar.gz | |
-rewrite expire/refresh section
Diffstat (limited to 'lib/sqlalchemy/orm/session.py')
| -rw-r--r-- | lib/sqlalchemy/orm/session.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index c10a0efc9..5bd46691e 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -1220,6 +1220,14 @@ class Session(_SessionClassMethods): :param lockmode: Passed to the :class:`~sqlalchemy.orm.query.Query` as used by :meth:`~sqlalchemy.orm.query.Query.with_lockmode`. + .. seealso:: + + :ref:`session_expire` - introductory material + + :meth:`.Session.expire` + + :meth:`.Session.expire_all` + """ try: state = attributes.instance_state(instance) @@ -1258,6 +1266,14 @@ class Session(_SessionClassMethods): calling :meth:`Session.expire_all` should not be needed when autocommit is ``False``, assuming the transaction is isolated. + .. seealso:: + + :ref:`session_expire` - introductory material + + :meth:`.Session.expire` + + :meth:`.Session.refresh` + """ for state in self.identity_map.all_states(): state._expire(state.dict, self.identity_map._modified) @@ -1288,6 +1304,14 @@ class Session(_SessionClassMethods): :param attribute_names: optional list of string attribute names indicating a subset of attributes to be expired. + .. seealso:: + + :ref:`session_expire` - introductory material + + :meth:`.Session.expire` + + :meth:`.Session.refresh` + """ try: state = attributes.instance_state(instance) |
