Return the full SELECT statement represented by this :class:`_query.Query`, converted to a scalar subquery with a label of the given name. .. seealso:: :meth:`_sql.Select.label` - v2 comparable method.
(self, name: Optional[str])
| 715 | ) |
| 716 | |
| 717 | def label(self, name: Optional[str]) -> Label[Any]: |
| 718 | """Return the full SELECT statement represented by this |
| 719 | :class:`_query.Query`, converted |
| 720 | to a scalar subquery with a label of the given name. |
| 721 | |
| 722 | .. seealso:: |
| 723 | |
| 724 | :meth:`_sql.Select.label` - v2 comparable method. |
| 725 | |
| 726 | """ |
| 727 | |
| 728 | return ( |
| 729 | self.enable_eagerloads(False) |
| 730 | ._get_select_statement_only() |
| 731 | .label(name) |
| 732 | ) |
| 733 | |
| 734 | @overload |
| 735 | def as_scalar( # type: ignore[overload-overlap] |
nothing calls this directly
no test coverage detected