MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / object_session

Method object_session

lib/sqlalchemy/orm/session.py:232–239  ·  view source on GitHub ↗

Return the :class:`.Session` to which an object belongs. This is an alias of :func:`.object_session`.

(cls, instance: object)

Source from the content-addressed store, hash-verified

230
231 @classmethod
232 def object_session(cls, instance: object) -> Optional[Session]:
233 """Return the :class:`.Session` to which an object belongs.
234
235 This is an alias of :func:`.object_session`.
236
237 """
238
239 return object_session(instance)
240
241
242class SessionTransactionState(_StateChangeState):

Callers

nothing calls this directly

Calls 1

object_sessionFunction · 0.85

Tested by

no test coverage detected