MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / connection

Method connection

lib/sqlalchemy/orm/session.py:1045–1052  ·  view source on GitHub ↗
(
        self,
        bindkey: Optional[Mapper[Any]],
        execution_options: Optional[_ExecuteOptions] = None,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

1043 (SessionTransactionState.ACTIVE,), _StateChangeStates.NO_CHANGE
1044 )
1045 def connection(
1046 self,
1047 bindkey: Optional[Mapper[Any]],
1048 execution_options: Optional[_ExecuteOptions] = None,
1049 **kwargs: Any,
1050 ) -> Connection:
1051 bind = self.session.get_bind(bindkey, **kwargs)
1052 return self._connection_for_bind(bind, execution_options)
1053
1054 @_StateChange.declare_states(
1055 (SessionTransactionState.ACTIVE,), _StateChangeStates.NO_CHANGE

Callers

nothing calls this directly

Calls 2

_connection_for_bindMethod · 0.95
get_bindMethod · 0.45

Tested by

no test coverage detected