From 90d1f98f43fecd50ec215815e99f436748a92136 Mon Sep 17 00:00:00 2001 From: Vraj Mohan Date: Fri, 15 Nov 2013 11:11:13 -0500 Subject: [PATCH] Generate API and resolve cross references --- doc/build/orm/internals.rst | 5 ++++- lib/sqlalchemy/orm/events.py | 8 ++++---- lib/sqlalchemy/orm/session.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/build/orm/internals.rst b/doc/build/orm/internals.rst index e2f5b7f62a..023a9f37b1 100644 --- a/doc/build/orm/internals.rst +++ b/doc/build/orm/internals.rst @@ -71,5 +71,8 @@ sections, are listed here. .. autoclass:: sqlalchemy.orm.attributes.QueryableAttribute :members: - :inherited-members: + +.. autoclass:: sqlalchemy.orm.session.UOWTransaction + :members: + diff --git a/lib/sqlalchemy/orm/events.py b/lib/sqlalchemy/orm/events.py index 855841408c..d34e2395b4 100644 --- a/lib/sqlalchemy/orm/events.py +++ b/lib/sqlalchemy/orm/events.py @@ -1116,7 +1116,7 @@ class SessionEvents(event.Events): The :func:`~.event.listen` function will accept :class:`.Session` objects as well as the return result - of :func:`.sessionmaker` and :func:`.scoped_session`. + of :class:`~.sessionmaker()` and :class:`~.scoped_session()`. Additionally, it accepts the :class:`.Session` class which will apply listeners to all :class:`.Session` instances @@ -1203,7 +1203,7 @@ class SessionEvents(event.Events): .. note:: - The :meth:`.before_commit` hook is *not* per-flush, + The :meth:`~.SessionEvents.before_commit` hook is *not* per-flush, that is, the :class:`.Session` can emit SQL to the database many times within the scope of a transaction. For interception of these events, use the :meth:`~.SessionEvents.before_flush`, @@ -1389,7 +1389,7 @@ class SessionEvents(event.Events): This is called before an add, delete or merge causes the object to be part of the session. - .. versionadded:: 0.8. Note that :meth:`.after_attach` now + .. versionadded:: 0.8. Note that :meth:`~.SessionEvents.after_attach` now fires off after the item is part of the session. :meth:`.before_attach` is provided for those cases where the item should not yet be part of the session state. @@ -1504,7 +1504,7 @@ class AttributeEvents(event.Events): listen(UserContact.phone, 'set', validate_phone, retval=True) A validation function like the above can also raise an exception - such as :class:`.ValueError` to halt the operation. + such as :exc:`ValueError` to halt the operation. Several modifiers are available to the :func:`~.event.listen` function. diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index 2176862687..6d4b239881 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -823,7 +823,7 @@ class Session(_SessionClassMethods): etc.) which will be used to locate a bind, if a bind cannot otherwise be identified. - :param close_with_result: Passed to :meth:`Engine.connect`, indicating + :param close_with_result: Passed to :meth:`.Engine.connect`, indicating the :class:`.Connection` should be considered "single use", automatically closing when the first result set is closed. This flag only has an effect if this :class:`.Session` is configured with -- 2.47.3