MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _begin

Method _begin

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

Source from the content-addressed store, hash-verified

1055 (SessionTransactionState.ACTIVE,), _StateChangeStates.NO_CHANGE
1056 )
1057 def _begin(self, nested: bool = False) -> SessionTransaction:
1058 return SessionTransaction(
1059 self.session,
1060 (
1061 SessionTransactionOrigin.BEGIN_NESTED
1062 if nested
1063 else SessionTransactionOrigin.SUBTRANSACTION
1064 ),
1065 self,
1066 )
1067
1068 def _iterate_self_and_parents(
1069 self, upto: Optional[SessionTransaction] = None

Callers 5

beginMethod · 0.80
_flushMethod · 0.80
_bulk_save_mappingsMethod · 0.80

Calls 1

SessionTransactionClass · 0.85