been rolled back already - this is so that the overall nesting pattern of
so-called "subtransactions" is consistently maintained.
+.. _session_committing:
+
Committing
----------
behaves in exactly the same way with regard to attribute state, except no
transaction is present.
+.. _session_rollback:
+
Rolling Back
------------
to the first real transaction are closed. Subtransactions occur when
begin() is called multiple times.
+ .. seealso::
+
+ :ref:`session_rollback`
+
"""
if self.transaction is None:
pass
multiple times), the subtransaction will be closed, and the next call
to ``commit()`` will operate on the enclosing transaction.
- For a session configured with autocommit=False, a new transaction will
+ When using the :class:`.Session` in its default mode of
+ ``autocommit=False``, a new transaction will
be begun immediately after the commit, but note that the newly begun
transaction does *not* use any connection resources until the first
SQL is actually emitted.
+ .. seealso::
+
+ :ref:`session_committing`
+
"""
if self.transaction is None:
if not self.autocommit: