MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _set_select_from

Method _set_select_from

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

Source from the content-addressed store, hash-verified

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
374 ) -> None:
375 fa = [
376 coercions.expect(
377 roles.FromClauseRole,
378 elem,
379 apply_propagate_attrs=self,
380 )
381 for elem in obj
382 ]
383
384 self._compile_options += {"_set_base_alias": set_base_alias}
385 self._from_obj = tuple(fa)
386
387 @_generative
388 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