(
self,
fn: Callable[[Select[Any]], Select[Any]],
)
| 6934 | return [] |
| 6935 | |
| 6936 | def _regroup( |
| 6937 | self, |
| 6938 | fn: Callable[[Select[Any]], Select[Any]], |
| 6939 | ) -> ScalarSelect[Any]: |
| 6940 | |
| 6941 | assert isinstance(self.element, ScalarSelect) |
| 6942 | element = self.element.element |
| 6943 | if not isinstance(element, Select): |
| 6944 | raise exc.InvalidRequestError( |
| 6945 | "Can only apply this operation to a plain SELECT construct" |
| 6946 | ) |
| 6947 | new_element = fn(element) |
| 6948 | |
| 6949 | return_value = new_element.scalar_subquery() |
| 6950 | return return_value |
| 6951 | |
| 6952 | def select(self) -> Select[Tuple[bool]]: |
| 6953 | r"""Return a SELECT of this :class:`_expression.Exists`. |
no test coverage detected