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

Method _connection_for_bind

lib/sqlalchemy/orm/session.py:2102–2113  ·  view source on GitHub ↗
(
        self,
        engine: _SessionBind,
        execution_options: Optional[CoreExecuteOptionsParameter] = None,
        **kw: Any,
    )

Source from the content-addressed store, hash-verified

2100 )
2101
2102 def _connection_for_bind(
2103 self,
2104 engine: _SessionBind,
2105 execution_options: Optional[CoreExecuteOptionsParameter] = None,
2106 **kw: Any,
2107 ) -> Connection:
2108 TransactionalContext._trans_ctx_check(self)
2109
2110 trans = self._transaction
2111 if trans is None:
2112 trans = self._autobegin_t()
2113 return trans._connection_for_bind(engine, execution_options)
2114
2115 @overload
2116 def _execute_internal(

Callers 3

connectionMethod · 0.95
_execute_internalMethod · 0.95
_connection_for_bindMethod · 0.45

Calls 2

_autobegin_tMethod · 0.95
_trans_ctx_checkMethod · 0.80

Tested by

no test coverage detected