MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / has_parent

Method has_parent

lib/sqlalchemy/orm/instrumentation.py:546–550  ·  view source on GitHub ↗

TODO

(
        self, state: InstanceState[_O], key: str, optimistic: bool = False
    )

Source from the content-addressed store, hash-verified

544 return hasattr(instance, self.STATE_ATTR)
545
546 def has_parent(
547 self, state: InstanceState[_O], key: str, optimistic: bool = False
548 ) -> bool:
549 """TODO"""
550 return self.get_impl(key).hasparent(state, optimistic=optimistic)
551
552 def __bool__(self) -> bool:
553 """All ClassManagers are non-zero regardless of attribute state."""

Callers 6

_is_orphanMethod · 0.80
has_parentFunction · 0.80
_assert_hasparentMethod · 0.80
_assert_not_hasparentMethod · 0.80
test_lazytrackparentMethod · 0.80
test_parenttrackMethod · 0.80

Calls 2

get_implMethod · 0.95
hasparentMethod · 0.45

Tested by 4

_assert_hasparentMethod · 0.64
_assert_not_hasparentMethod · 0.64
test_lazytrackparentMethod · 0.64
test_parenttrackMethod · 0.64