MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _register_attribute

Function _register_attribute

lib/sqlalchemy/orm/attributes.py:2606–2619  ·  view source on GitHub ↗
(
    class_: Type[_O],
    key: str,
    *,
    comparator: interfaces.PropComparator[_T],
    parententity: _InternalEntityType[_O],
    doc: Optional[str] = None,
    **kw: Any,
)

Source from the content-addressed store, hash-verified

2604
2605
2606def _register_attribute(
2607 class_: Type[_O],
2608 key: str,
2609 *,
2610 comparator: interfaces.PropComparator[_T],
2611 parententity: _InternalEntityType[_O],
2612 doc: Optional[str] = None,
2613 **kw: Any,
2614) -> InstrumentedAttribute[_T]:
2615 desc = _register_descriptor(
2616 class_, key, comparator=comparator, parententity=parententity, doc=doc
2617 )
2618 _register_attribute_impl(class_, key, **kw)
2619 return desc
2620
2621
2622def _register_attribute_impl(

Callers

nothing calls this directly

Calls 2

_register_descriptorFunction · 0.85
_register_attribute_implFunction · 0.85

Tested by

no test coverage detected