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

Method where

lib/sqlalchemy/sql/selectable.py:6493–6507  ·  view source on GitHub ↗

Return a new :func:`_expression.select` construct with the given expression added to its WHERE clause, joined to the existing clause via AND, if any.

(self, *whereclause: _ColumnExpressionArgument[bool])

Source from the content-addressed store, hash-verified

6491
6492 @_generative
6493 def where(self, *whereclause: _ColumnExpressionArgument[bool]) -> Self:
6494 """Return a new :func:`_expression.select` construct with
6495 the given expression added to
6496 its WHERE clause, joined to the existing clause via AND, if any.
6497
6498 """
6499
6500 assert isinstance(self._where_criteria, tuple)
6501
6502 for criterion in whereclause:
6503 where_criteria: ColumnElement[Any] = coercions.expect(
6504 roles.WhereHavingRole, criterion, apply_propagate_attrs=self
6505 )
6506 self._where_criteria += (where_criteria,)
6507 return self
6508
6509 @_generative
6510 def having(self, *having: _ColumnExpressionArgument[bool]) -> Self:

Callers 3

filterMethod · 0.95
whereMethod · 0.45
whereMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected