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

Method select_from

lib/sqlalchemy/sql/selectable.py:7010–7025  ·  view source on GitHub ↗

Return a new :class:`_expression.Exists` construct, applying the given expression to the :meth:`_expression.Select.select_from` method of the select statement contained. .. note:: it is typically preferable to build a :class:`_sql.Select` statement

(self, *froms: _FromClauseArgument)

Source from the content-addressed store, hash-verified

7008 return e
7009
7010 def select_from(self, *froms: _FromClauseArgument) -> Self:
7011 """Return a new :class:`_expression.Exists` construct,
7012 applying the given
7013 expression to the :meth:`_expression.Select.select_from`
7014 method of the select
7015 statement contained.
7016
7017 .. note:: it is typically preferable to build a :class:`_sql.Select`
7018 statement first, including the desired WHERE clause, then use the
7019 :meth:`_sql.SelectBase.exists` method to produce an
7020 :class:`_sql.Exists` object at once.
7021
7022 """
7023 e = self._clone()
7024 e.element = self._regroup(lambda element: element.select_from(*froms))
7025 return e
7026
7027 def where(self, *clause: _ColumnExpressionArgument[bool]) -> Self:
7028 """Return a new :func:`_expression.exists` construct with the

Callers

nothing calls this directly

Calls 3

_regroupMethod · 0.95
_cloneMethod · 0.45
select_fromMethod · 0.45

Tested by

no test coverage detected