MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / has_parent

Method has_parent

lib/sqlalchemy/orm/instrumentation.py:554–558  ·  view source on GitHub ↗

TODO

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

Source from the content-addressed store, hash-verified

552 return hasattr(instance, self.STATE_ATTR)
553
554 def has_parent(
555 self, state: InstanceState[_O], key: str, optimistic: bool = False
556 ) -> bool:
557 """TODO"""
558 return self.get_impl(key).hasparent(state, optimistic=optimistic)
559
560 def __bool__(self) -> bool:
561 """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