MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _only_full_mapper_zero

Method _only_full_mapper_zero

lib/sqlalchemy/orm/query.py:359–370  ·  view source on GitHub ↗
(self, methname: str)

Source from the content-addressed store, hash-verified

357 return None
358
359 def _only_full_mapper_zero(self, methname: str) -> Mapper[Any]:
360 if (
361 len(self._raw_columns) != 1
362 or "parententity" not in self._raw_columns[0]._annotations
363 or not self._raw_columns[0].is_selectable
364 ):
365 raise sa_exc.InvalidRequestError(
366 "%s() can only be used against "
367 "a single mapped class." % methname
368 )
369
370 return self._raw_columns[0]._annotations["parententity"] # type: ignore # noqa: E501
371
372 def _set_select_from(
373 self, obj: Iterable[_FromClauseArgument], set_base_alias: bool

Callers 1

_get_implMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected