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

Method _set_select_from

lib/sqlalchemy/orm/query.py:356–370  ·  view source on GitHub ↗
(
        self, obj: Iterable[_FromClauseArgument], set_base_alias: bool
    )

Source from the content-addressed store, hash-verified

354 return self._raw_columns[0]._annotations["parententity"] # type: ignore # noqa: E501
355
356 def _set_select_from(
357 self, obj: Iterable[_FromClauseArgument], set_base_alias: bool
358 ) -> None:
359 fa = [
360 coercions.expect(
361 roles.StrictFromClauseRole,
362 elem,
363 allow_select=True,
364 apply_propagate_attrs=self,
365 )
366 for elem in obj
367 ]
368
369 self._compile_options += {"_set_base_alias": set_base_alias}
370 self._from_obj = tuple(fa)
371
372 @_generative
373 def _set_lazyload_from(self, state: InstanceState[Any]) -> Self:

Callers 2

_from_selectableMethod · 0.95
select_fromMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected