MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / select_from

Method select_from

lib/sqlalchemy/sql/selectable.py:7302–7317  ·  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

7300 return e
7301
7302 def select_from(self, *froms: _FromClauseArgument) -> Self:
7303 """Return a new :class:`_expression.Exists` construct,
7304 applying the given
7305 expression to the :meth:`_expression.Select.select_from`
7306 method of the select
7307 statement contained.
7308
7309 .. note:: it is typically preferable to build a :class:`_sql.Select`
7310 statement first, including the desired WHERE clause, then use the
7311 :meth:`_sql.SelectBase.exists` method to produce an
7312 :class:`_sql.Exists` object at once.
7313
7314 """
7315 e = self._clone()
7316 e.element = self._regroup(lambda element: element.select_from(*froms))
7317 return e
7318
7319 def where(self, *clause: _ColumnExpressionArgument[bool]) -> Self:
7320 """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