MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _state_session

Function _state_session

lib/sqlalchemy/orm/session.py:197–201  ·  view source on GitHub ↗

Given an :class:`.InstanceState`, return the :class:`.Session` associated, if any.

(state: InstanceState[Any])

Source from the content-addressed store, hash-verified

195
196
197def _state_session(state: InstanceState[Any]) -> Optional[Session]:
198 """Given an :class:`.InstanceState`, return the :class:`.Session`
199 associated, if any.
200 """
201 return state.session
202
203
204class _SessionClassMethods:

Callers 4

make_transientFunction · 0.85
object_sessionFunction · 0.85
_load_for_stateMethod · 0.85
_load_for_stateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected