MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / label

Method label

lib/sqlalchemy/sql/selectable.py:3761–3770  ·  view source on GitHub ↗

Return a 'scalar' representation of this selectable, embedded as a subquery with a label. .. seealso:: :meth:`_expression.SelectBase.scalar_subquery`.

(self, name: Optional[str])

Source from the content-addressed store, hash-verified

3759 return ScalarSelect(self)
3760
3761 def label(self, name: Optional[str]) -> Label[Any]:
3762 """Return a 'scalar' representation of this selectable, embedded as a
3763 subquery with a label.
3764
3765 .. seealso::
3766
3767 :meth:`_expression.SelectBase.scalar_subquery`.
3768
3769 """
3770 return self.scalar_subquery().label(name)
3771
3772 def lateral(self, name: Optional[str] = None) -> LateralFromClause:
3773 """Return a LATERAL alias of this :class:`_expression.Selectable`.

Callers 2

_implicit_coercionsMethod · 0.45
_all_selected_columnsMethod · 0.45

Calls 1

scalar_subqueryMethod · 0.95

Tested by

no test coverage detected