MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __call__

Method __call__

lib/sqlalchemy/orm/strategies.py:579–593  ·  view source on GitHub ↗
(self, state, passive=attributes.PASSIVE_OFF)

Source from the content-addressed store, hash-verified

577 self.raiseload = raiseload
578
579 def __call__(self, state, passive=attributes.PASSIVE_OFF):
580 key = self.key
581
582 localparent = state.manager.mapper
583 prop = localparent._props[key]
584 if self.raiseload:
585 strategy_key = (
586 ("deferred", True),
587 ("instrument", True),
588 ("raiseload", True),
589 )
590 else:
591 strategy_key = (("deferred", True), ("instrument", True))
592 strategy = prop._get_strategy(strategy_key)
593 return strategy._load_for_state(state, passive)
594
595
596class _AbstractRelationshipLoader(LoaderStrategy):

Callers

nothing calls this directly

Calls 2

_get_strategyMethod · 0.80
_load_for_stateMethod · 0.45

Tested by

no test coverage detected