MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / where

Method where

lib/sqlalchemy/sql/selectable.py:7319–7333  ·  view source on GitHub ↗

Return a new :func:`_expression.exists` construct with the given expression added to its WHERE clause, joined to the existing clause via AND, if any. .. note:: it is typically preferable to build a :class:`_sql.Select` statement first, including the desired WHERE

(self, *clause: _ColumnExpressionArgument[bool])

Source from the content-addressed store, hash-verified

7317 return e
7318
7319 def where(self, *clause: _ColumnExpressionArgument[bool]) -> Self:
7320 """Return a new :func:`_expression.exists` construct with the
7321 given expression added to
7322 its WHERE clause, joined to the existing clause via AND, if any.
7323
7324
7325 .. note:: it is typically preferable to build a :class:`_sql.Select`
7326 statement first, including the desired WHERE clause, then use the
7327 :meth:`_sql.SelectBase.exists` method to produce an
7328 :class:`_sql.Exists` object at once.
7329
7330 """
7331 e = self._clone()
7332 e.element = self._regroup(lambda element: element.where(*clause))
7333 return e
7334
7335
7336class TextualSelect(SelectBase, ExecutableReturnsRows, Generative):

Callers

nothing calls this directly

Calls 3

_regroupMethod · 0.95
_cloneMethod · 0.45
whereMethod · 0.45

Tested by

no test coverage detected