MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / _begin

Method _begin

lib/sqlalchemy/orm/session.py:1046–1055  ·  view source on GitHub ↗
(self, nested: bool = False)

Source from the content-addressed store, hash-verified

1044 (SessionTransactionState.ACTIVE,), _StateChangeStates.NO_CHANGE
1045 )
1046 def _begin(self, nested: bool = False) -> SessionTransaction:
1047 return SessionTransaction(
1048 self.session,
1049 (
1050 SessionTransactionOrigin.BEGIN_NESTED
1051 if nested
1052 else SessionTransactionOrigin.SUBTRANSACTION
1053 ),
1054 self,
1055 )
1056
1057 def _iterate_self_and_parents(
1058 self, upto: Optional[SessionTransaction] = None

Callers 5

beginMethod · 0.80
_flushMethod · 0.80
_bulk_save_mappingsMethod · 0.80

Calls 1

SessionTransactionClass · 0.85