MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _getitem

Method _getitem

lib/sqlalchemy/orm/path_registry.py:758–766  ·  view source on GitHub ↗
(
        self, entity: Any
    )

Source from the content-addressed store, hash-verified

756 return True
757
758 def _getitem(
759 self, entity: Any
760 ) -> Union[_PathElementType, _PathRepresentation, PathRegistry]:
761 if isinstance(entity, (int, slice)):
762 return self.path[entity]
763 elif entity in PathToken._intern:
764 return _TokenRegistry(self, PathToken._intern[entity])
765 else:
766 return _PropRegistry(self, entity)
767
768 if not TYPE_CHECKING:
769 __getitem__ = _getitem

Callers

nothing calls this directly

Calls 2

_TokenRegistryClass · 0.85
_PropRegistryClass · 0.85

Tested by

no test coverage detected