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

Method _get_select_statement_only

lib/sqlalchemy/orm/query.py:489–494  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

487 return self._generate()
488
489 def _get_select_statement_only(self) -> Select[_T]:
490 if self._statement is not None:
491 raise sa_exc.InvalidRequestError(
492 "Can't call this method on a Query that uses from_statement()"
493 )
494 return cast("Select[_T]", self.statement)
495
496 @property
497 def statement(self) -> Union[Select[_T], FromStatement[_T], UpdateBase]:

Callers 5

subqueryMethod · 0.80
cteMethod · 0.80
labelMethod · 0.80
scalar_subqueryMethod · 0.80
existsMethod · 0.80

Calls 1

castFunction · 0.85

Tested by

no test coverage detected