MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / adapt_to_entity

Method adapt_to_entity

lib/sqlalchemy/orm/attributes.py:400–408  ·  view source on GitHub ↗
(self, adapt_to_entity: AliasedInsp[Any])

Source from the content-addressed store, hash-verified

398 return self.comparator._bulk_dml_setter(key)
399
400 def adapt_to_entity(self, adapt_to_entity: AliasedInsp[Any]) -> Self:
401 assert not self._of_type
402 return self.__class__(
403 adapt_to_entity.entity,
404 self.key,
405 impl=self.impl,
406 comparator=self.comparator.adapt_to_entity(adapt_to_entity),
407 parententity=adapt_to_entity,
408 )
409
410 def of_type(self, entity: _EntityType[_T]) -> QueryableAttribute[_T]:
411 return QueryableAttribute(

Callers

nothing calls this directly

Calls 1

adapt_to_entityMethod · 0.45

Tested by

no test coverage detected