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])
| 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: |