(
self,
fn: Callable[[Select[Unpack[TupleAny]]], Select[Unpack[TupleAny]]],
)
| 7226 | return [] |
| 7227 | |
| 7228 | def _regroup( |
| 7229 | self, |
| 7230 | fn: Callable[[Select[Unpack[TupleAny]]], Select[Unpack[TupleAny]]], |
| 7231 | ) -> ScalarSelect[Any]: |
| 7232 | |
| 7233 | assert isinstance(self.element, ScalarSelect) |
| 7234 | element = self.element.element |
| 7235 | if not isinstance(element, Select): |
| 7236 | raise exc.InvalidRequestError( |
| 7237 | "Can only apply this operation to a plain SELECT construct" |
| 7238 | ) |
| 7239 | new_element = fn(element) |
| 7240 | |
| 7241 | return_value = new_element.scalar_subquery() |
| 7242 | return return_value |
| 7243 | |
| 7244 | def select(self) -> Select[bool]: |
| 7245 | r"""Return a SELECT of this :class:`_expression.Exists`. |
no test coverage detected